From 66d777b1d7e1bb2e613add021907b081ef2de553 Mon Sep 17 00:00:00 2001 From: AshanFernando Date: Mon, 16 Dec 2013 09:58:23 +0530 Subject: [PATCH 1/2] Fixing the merge conflict. Thanks @Matt Thomas --- media/system/js/core-uncompressed.js | 2 +- media/system/js/core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/media/system/js/core-uncompressed.js b/media/system/js/core-uncompressed.js index 5db2334a285b2..bb49852b56eb5 100644 --- a/media/system/js/core-uncompressed.js +++ b/media/system/js/core-uncompressed.js @@ -18,7 +18,7 @@ Joomla.submitform = function(task, form) { form = document.getElementById('adminForm'); } - if (typeof(task) !== 'undefined') { + if (typeof(task) !== 'undefined' && task !== "") { form.task.value = task; } diff --git a/media/system/js/core.js b/media/system/js/core.js index c708a00e586aa..894f956c63063 100644 --- a/media/system/js/core.js +++ b/media/system/js/core.js @@ -1,4 +1,4 @@ /* GNU General Public License version 2 or later; see LICENSE.txt */ -Joomla=window.Joomla||{};Joomla.editors={};Joomla.editors.instances={};Joomla.submitform=function(a,b){if(typeof(b)==="undefined"){b=document.getElementById("adminForm")}if(typeof(a)!=="undefined"){b.task.value=a}if(typeof b.onsubmit=="function"){b.onsubmit()}if(typeof b.fireEvent=="function"){b.fireEvent("submit")}b.submit()};Joomla.submitbutton=function(a){Joomla.submitform(a)};Joomla.JText={strings:{},_:function(a,b){return typeof this.strings[a.toUpperCase()]!=="undefined"?this.strings[a.toUpperCase()]:b},load:function(a){for(var b in a){this.strings[b.toUpperCase()]=a[b]}return this}};Joomla.replaceTokens=function(c){var b=document.getElementsByTagName("input"),a;for(a=0;a",{id:"system-message","class":"alert alert-"+h});g.append(b);a=e("

",{"class":"alert-heading",text:Joomla.JText._(h)});b.append(a);f=e("
");e.each(j,function(k,l){c=e("

",{html:l});f.append(c)});b.append(f)})};Joomla.removeMessages=function(){jQuery("#system-message-container").empty()};Joomla.isChecked=function(a,b){if(typeof(b)==="undefined"){b=document.getElementById("adminForm")}if(a==true){b.boxchecked.value++}else{b.boxchecked.value--}};Joomla.popupWindow=function(e,k,j,c,f){var g=(screen.width-j)/2,b,a,d;b=(screen.height-c)/2;a="height="+c+",width="+j+",top="+b+",left="+g+",scrollbars="+f+",resizable";d=window.open(e,k,a);d.window.focus()};Joomla.tableOrdering=function(a,c,b,d){if(typeof(d)==="undefined"){d=document.getElementById("adminForm")}d.filter_order.value=a;d.filter_order_Dir.value=c;Joomla.submitform(b,d)};function writeDynaList(e,g,d,h,a){var c="\n ";document.writeln(c)}function changeDynaList(c,e,b,f,a){var d=document.adminForm[c];for(i in d.options.length){d.options[i]=null}i=0;for(x in e){if(e[x][0]==b){opt=new Option();opt.value=e[x][1];opt.text=e[x][2];if((f==b&&a==opt.value)||i==0){opt.selected=true}d.options[i++]=opt}}d.length=i}function radioGetCheckedValue(b){if(!b){return""}var c=b.length,a;if(c==undefined){if(b.checked){return b.value}else{return""}}for(a=0;a-1){return d.options[i].value}else{return null}}function listItemTask(g,b){var d=document.adminForm,c,e,a=d[g];if(a){for(c=0;true;c++){e=d["cb"+c];if(!e){break}e.checked=false}a.checked=true;d.boxchecked.value=1;submitbutton(b)}return false}function submitbutton(a){submitform(a)}function submitform(a){if(a){document.adminForm.task.value=a}if(typeof document.adminForm.onsubmit=="function"){document.adminForm.onsubmit()}if(typeof document.adminForm.fireEvent=="function"){document.adminForm.fireEvent("submit")}document.adminForm.submit()}function saveorder(b,a){checkAll_button(b,a)}function checkAll_button(d,a){if(!a){a="saveorder"}var b,c;for(b=0;b<=d;b++){c=document.adminForm["cb"+b];if(c){if(c.checked==false){c.checked=true}}else{alert("You cannot change the order of items, as an item in the list is `Checked Out`");return}}submitform(a)}; +Joomla=window.Joomla||{};Joomla.editors={};Joomla.editors.instances={};Joomla.submitform=function(a,b){if(typeof(b)==="undefined"){b=document.getElementById("adminForm");}if(typeof(a)!=="undefined"&&a!==""){b.task.value=a;}if(typeof b.onsubmit=="function"){b.onsubmit();}if(typeof b.fireEvent=="function"){b.fireEvent("submit");}b.submit();};Joomla.submitbutton=function(a){Joomla.submitform(a);};Joomla.JText={strings:{},_:function(a,b){return typeof this.strings[a.toUpperCase()]!=="undefined"?this.strings[a.toUpperCase()]:b;},load:function(a){for(var b in a){this.strings[b.toUpperCase()]=a[b];}return this;}};Joomla.replaceTokens=function(c){var b=document.getElementsByTagName("input"),a;for(a=0;a",{id:"system-message","class":"alert alert-"+h});g.append(b);a=e("

",{"class":"alert-heading",text:Joomla.JText._(h)});b.append(a);f=e("
");e.each(j,function(k,l){c=e("

",{html:l});f.append(c);});b.append(f);});};Joomla.removeMessages=function(){jQuery("#system-message-container").empty();};Joomla.isChecked=function(a,b){if(typeof(b)==="undefined"){b=document.getElementById("adminForm");}if(a==true){b.boxchecked.value++;}else{b.boxchecked.value--;}};Joomla.popupWindow=function(e,k,j,c,f){var g=(screen.width-j)/2,b,a,d;b=(screen.height-c)/2;a="height="+c+",width="+j+",top="+b+",left="+g+",scrollbars="+f+",resizable";d=window.open(e,k,a);d.window.focus();};Joomla.tableOrdering=function(a,c,b,d){if(typeof(d)==="undefined"){d=document.getElementById("adminForm");}d.filter_order.value=a;d.filter_order_Dir.value=c;Joomla.submitform(b,d);};function writeDynaList(e,g,d,h,a){var c="\n ";document.writeln(c);}function changeDynaList(c,e,b,f,a){var d=document.adminForm[c];for(i in d.options.length){d.options[i]=null;}i=0;for(x in e){if(e[x][0]==b){opt=new Option();opt.value=e[x][1];opt.text=e[x][2];if((f==b&&a==opt.value)||i==0){opt.selected=true;}d.options[i++]=opt;}}d.length=i;}function radioGetCheckedValue(b){if(!b){return"";}var c=b.length,a;if(c==undefined){if(b.checked){return b.value;}else{return"";}}for(a=0;a-1){return d.options[i].value;}else{return null;}}function listItemTask(g,b){var d=document.adminForm,c,e,a=d[g];if(a){for(c=0;true;c++){e=d["cb"+c];if(!e){break;}e.checked=false;}a.checked=true;d.boxchecked.value=1;submitbutton(b);}return false;}function submitbutton(a){submitform(a);}function submitform(a){if(a){document.adminForm.task.value=a;}if(typeof document.adminForm.onsubmit=="function"){document.adminForm.onsubmit();}if(typeof document.adminForm.fireEvent=="function"){document.adminForm.fireEvent("submit");}document.adminForm.submit();}function saveorder(b,a){checkAll_button(b,a);}function checkAll_button(d,a){if(!a){a="saveorder";}var b,c;for(b=0;b<=d;b++){c=document.adminForm["cb"+b];if(c){if(c.checked==false){c.checked=true;}}else{alert("You cannot change the order of items, as an item in the list is `Checked Out`");return;}}submitform(a);} \ No newline at end of file From b58956211a2e9516c26145f35252ebddfe85aff1 Mon Sep 17 00:00:00 2001 From: AshanFernando Date: Mon, 16 Dec 2013 10:13:28 +0530 Subject: [PATCH 2/2] Temporary including JHtml::_('jquery.framework'); until it further decided since JHtmlBehavior::framework is getting depreciated in 4.0 --- libraries/cms/html/behavior.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/cms/html/behavior.php b/libraries/cms/html/behavior.php index 85c07ef9b5ef2..a0460219091be 100644 --- a/libraries/cms/html/behavior.php +++ b/libraries/cms/html/behavior.php @@ -61,6 +61,7 @@ public static function framework($extras = false, $debug = null) } JHtml::_('script', 'system/mootools-' . $type . '.js', false, true, false, false, $debug); + JHtml::_('jquery.framework'); JHtml::_('script', 'system/core.js', false, true); static::$loaded[__METHOD__][$type] = true;