- Timestamp:
- 09.11.2011 22:47:59 (6 months ago)
- Location:
- ZMS/trunk
- Files:
-
- 4 edited
-
dtml/object/manage_page_header.dtml (modified) (1 diff)
-
plugins/www/jquery/jquery-all.min.js (modified) (3 diffs)
-
plugins/www/jquery/plugin/jquery.plugin.zmi.js (modified) (4 diffs)
-
www/main.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/dtml/object/manage_page_header.dtml
r1573 r1723 25 25 <dtml-if "HTTP_USER_AGENT.find('MSIE 8.0')>=0"> 26 26 <meta http-equiv="X-UA-Compatible" content="IE=8" /> 27 <dtml-elif "HTTP_USER_AGENT.find('MSIE 9.0')>=0"> 28 <meta http-equiv="X-UA-Compatible" content="IE=9" /> 27 29 <dtml-else> 28 30 <dtml-comment> IE 7 Compatibility Mode </dtml-comment> -
ZMS/trunk/plugins/www/jquery/jquery-all.min.js
r1719 r1723 72 72 })} 73 73 function zmiToggleMaximize(){toggleCookie('zmi_maximized');$('body').toggleClass('maximized')} 74 function selectCheckboxes(fm,v){if(typeof v=='undefined'){v=!$(':checkbox:not([name~=active])',fm). attr('checked')}75 $(':checkbox:not([name~=active])',fm). attr('checked',v)}74 function selectCheckboxes(fm,v){if(typeof v=='undefined'){v=!$(':checkbox:not([name~=active])',fm).prop('checked')} 75 $(':checkbox:not([name~=active])',fm).prop('checked',v)} 76 76 var zmiSortableRownum=null;$(function(){var sortableTables=$("table.zmi-sortable > tbody");if(sortableTables.length > 0){var fixHelper=function(e,ui){ui.children().each(function(){$(this).width($(this).width())});return ui};$("table.zmi-sortable > tbody").sortable({helper:fixHelper,forcePlaceholderSize:true,placeholder:'ui-state-highlight',handle:'.zmiContainerColLeft img.grippy',start:function(event,ui){var trs=$('table.zmi-sortable > tbody > tr');var i=0;for(i=0;i < trs.length;i++){if($(trs[i]).attr('id')==ui.item.attr('id')){break}} 77 77 zmiSortableRownum=i},stop:function(event,ui){var trs=$('table.zmi-sortable > tbody > tr');var i=0;for(i=0;i < trs.length;i++){if($(trs[i]).attr('id')==ui.item.attr('id')){break}} … … 106 106 zmiIframe(target,data,{title:getZMILangStr('BTN_INSERT'),close:function(event,ui){$('tr#tr_manage_addProduct').remove()} 107 107 })} 108 else {$fm.attr('action',target);$fm.unbind('submit');$fm.submit()}} 108 else {var $inputs=$("input:checkbox",$fm);for(var i=0;i < $inputs.length;i++){var $input=$($inputs[i]);confirm($input.attr("name")+"="+$input.val()+"["+$input.attr("checked")+"]"+"["+$input.prop("checked")+"]")} 109 $fm.attr('action',target);$fm.unbind('submit');$fm.submit()}} 110 function zmiActionChoose(e,id,sort_id){var fm=$(e.form);var $input=$('input[name="ids:list"][value='+id+']:checkbox',fm);var i=e.selectedIndex;var label=e.options[i].text;var action=e.options[i].value;if(action.indexOf("%s/")==0){action=id+action.substring(2,action.length)} 111 if(action.indexOf('?')> 0){location.href=action} 112 else {$input.prop("checked",true);if(zmiConfirmAction(fm,action,label)){zmiActionExecute(fm,e,action,id,sort_id,label)}} 113 $input.prop("checked",false);e.selectedIndex=0} 109 114 function zmiBrowseObjs(fmName,elName,lang){var elValue='';if(fmName.length>0&&elName.length>0){elValue=$('form[name='+fmName+'] input[name='+elName+']').val()} 110 115 var title=getZMILangStr('CAPTION_CHOOSEOBJ');var href="manage_browse_iframe";href+='?lang='+lang;href+='&fmName='+fmName;href+='&elName='+elName;href+='&elValue='+escape(elValue);if(selectedText){href+='&selectedText='+escape(selectedText)} … … 294 299 else if(target==""){b=false} 295 300 return b} 296 function zmiActionChoose(e,id,sort_id){var fm=$(e.form);var i=e.selectedIndex;var label=e.options[i].text;var action=e.options[i].value;if(action.indexOf("%s/")==0){action=id+action.substring(2,action.length)}297 if(action.indexOf('?')> 0){location.href=action}298 else {$("input[name=\x22ids:list\x22][value="+id+"]:checkbox",fm).attr('checked',true);if(zmiConfirmAction(fm,action,label)){zmiActionExecute(fm,e,action,id,sort_id,label)}}299 $("input[name=\x22ids:list\x22][value="+id+"]:checkbox",fm).attr('checked',false);e.selectedIndex=0}300 301 var zmiActionButtons=[ 301 302 {'id':'trash','standalone':false},{'id':'cut','standalone':false},{'id':'copy','standalone':false},{'id':'paste','standalone':true} -
ZMS/trunk/plugins/www/jquery/plugin/jquery.plugin.zmi.js
r1719 r1723 46 46 function selectCheckboxes(fm, v) { 47 47 if (typeof v == 'undefined') { 48 v = !$(':checkbox:not([name~=active])',fm). attr('checked');49 } 50 $(':checkbox:not([name~=active])',fm). attr('checked',v)48 v = !$(':checkbox:not([name~=active])',fm).prop('checked'); 49 } 50 $(':checkbox:not([name~=active])',fm).prop('checked',v) 51 51 } 52 52 … … 257 257 * @param el 258 258 */ 259 function zmiActionPopulate(el) 260 { 259 function zmiActionPopulate(el) { 261 260 if ( el.options[el.options.length-1].text.indexOf('---') != 0) { 262 261 return; … … 351 350 } 352 351 else { 352 var $inputs = $("input:checkbox",$fm); 353 for (var i = 0; i < $inputs.length; i++) { 354 var $input = $($inputs[i]); 355 confirm($input.attr("name")+"="+$input.val()+"["+$input.attr("checked")+"]"+"["+$input.prop("checked")+"]"); 356 } 353 357 $fm.attr('action',target); 354 358 $fm.unbind('submit'); … … 356 360 } 357 361 } 362 363 /** 364 * Choose action from select. 365 * 366 * @param e 367 * @param id 368 * @param sort_id 369 */ 370 function zmiActionChoose(e, id, sort_id) { 371 var fm = $(e.form); 372 var $input = $('input[name="ids:list"][value='+id+']:checkbox',fm); 373 var i = e.selectedIndex; 374 var label = e.options[i].text; 375 var action = e.options[i].value; 376 if (action.indexOf("%s/") == 0) { 377 action = id + action.substring(2, action.length); 378 } 379 if (action.indexOf('?') > 0) { 380 location.href = action; 381 } 382 else { 383 // Set checkbox. 384 $input.prop( "checked", true); 385 // Confirm and execute. 386 if (zmiConfirmAction(fm,action,label)) { 387 zmiActionExecute(fm,e,action,id,sort_id,label); 388 } 389 } 390 // Reset checkbox and select. 391 $input.prop( "checked", false); 392 e.selectedIndex = 0; 393 } 394 358 395 359 396 // ############################################################################ -
ZMS/trunk/www/main.js
r1382 r1723 83 83 } 84 84 85 /**86 * Choose action from select.87 *88 * @param e89 * @param id90 * @param sort_id91 */92 function zmiActionChoose(e, id, sort_id) {93 var fm = $(e.form);94 var i = e.selectedIndex;95 var label = e.options[i].text;96 var action = e.options[i].value;97 if (action.indexOf("%s/") == 0) {98 action = id + action.substring(2, action.length);99 }100 if (action.indexOf('?') > 0) {101 location.href = action;102 }103 else {104 // Set checkbox.105 $("input[name=\x22ids:list\x22][value="+id+"]:checkbox",fm).attr( 'checked', true);106 // Confirm and execute.107 if (zmiConfirmAction(fm,action,label)) {108 zmiActionExecute(fm,e,action,id,sort_id,label);109 }110 }111 // Reset checkbox and select.112 $("input[name=\x22ids:list\x22][value="+id+"]:checkbox",fm).attr( 'checked', false);113 e.selectedIndex = 0;114 }115 116 85 // ----------------------------------------------------------------------------- 117 86 // -- Action-Buttons
Note: See TracChangeset
for help on using the changeset viewer.
