Bugzilla – Attachment 3251 Details for
Bug 3013
Value builder for 006 and 008 need choices for all format types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Erase merge conflict marker left and replace XMLHttpRequest with jQuery
0003-Follow-up-to-Bug-3013-fix-merge-conflict-marker-and.patch (text/plain), 5.65 KB, created by
Salva Zaragoza Rubio
on 2011-03-04 19:48:26 UTC
(
hide
)
Description:
Erase merge conflict marker left and replace XMLHttpRequest with jQuery
Filename:
MIME Type:
Creator:
Salva Zaragoza Rubio
Created:
2011-03-04 19:48:26 UTC
Size:
5.65 KB
patch
obsolete
>From a4ad37ee11f7770de96881d3fa1244b120221063 Mon Sep 17 00:00:00 2001 >From: Salvador Zaragoza Rubio <salvazm@masmedios.com> >Date: Fri, 4 Mar 2011 20:22:26 +0100 >Subject: [PATCH] Follow up to Bug 3013: fix merge conflict marker and replace XMLHttpRequest with jQuery >Content-Type: text/plain; charset="utf-8" > >Erase merge conflict marker left on unimarc_standard_systemprefs.sql. >Replace XMLHttpRequest call for xml with jQuery Ajax interface. >Delete alert. >--- > .../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 - > .../intranet-tmpl/prog/en/js/xmlControlfield.js | 50 ++++++++----------- > 2 files changed, 21 insertions(+), 30 deletions(-) > >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >index 7a1d90e..bdf7b27 100755 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql >@@ -287,7 +287,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo'); >-<<<<<<< HEAD:installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('TypeOfMaterialsView_006_008','0','Display Type of Materials for plugin of fields 006 and 008 when cataloguing','','YesNo'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >index 67b0bf5..47f014c 100755 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >@@ -174,8 +174,8 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > this.h4_result = h4_result; > this.tr_result = tr_result; > };//xmlControlField >- >- >+ >+ > xmlControlField.prototype = > { > tagfield: "", >@@ -187,35 +187,28 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > table: null, > h4_result: "", > tr_result: "", >- >- >+ >+ > setIdMaterial: function(idMaterial) > { > this.idMaterial = idMaterial; > },//setIdMaterial >- >+ > loadXmlValues: function() > { >- var xmlhttp; >- try { >- if (window.XMLHttpRequest) { >- xmlhttp = new XMLHttpRequest(); >- if (xmlhttp.overrideMimeType) { >- xmlhttp.overrideMimeType('text/xml'); >- } >- } else if (window.ActiveXObject) { >- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP") || new ActiveXObject("Msxml2.XMLHTTP"); >- } >- xmlhttp.open("GET", "/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_" + this.tagfield + ".xml", false); >- xmlhttp.send(null); >- this.xmlDoc = xmlhttp.responseXML; >- if (this.xmlDoc) this.renderTemplate(); >- } catch (e) { >- //alert(e); >- } >+ this.xmlDoc = $.ajax({ >+ type: "GET", >+ url: "/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_" + this.tagfield + ".xml", >+ dataType: "xml", >+ async: false >+ }).responseXML; >+ if (this.xmlDoc) this.renderTemplate(); >+ $("*").ajaxError(function(evt, request, settings){ >+ alert("AJAX error: failed data receiving"); >+ }); > },//loadXmlValues >- >- >+ >+ > renderTemplate: function() > { > this.root = this.xmlDoc.documentElement; >@@ -229,8 +222,8 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > } > } > },//renderTemplate >- >- >+ >+ > renderSelectMaterial: function(nodeMaterial) > { > if (this.select != null && nodeMaterial != null && nodeMaterial.length > 0) { >@@ -258,8 +251,8 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > } > } > },//renderSelectMaterial >- >- >+ >+ > renderPositions: function(nodeMaterial, result) > { > var materialNode; >@@ -327,7 +320,6 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > } > strInnerHTML += "</select>"; > } >- //alert(strInnerHTML); > td.innerHTML = strInnerHTML; > } > nodePos = nodePos.nextSibling; >-- >1.5.6.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3013
:
2641
|
3247
|
3248
|
3251
|
3259