Changeset 12625
- Timestamp:
- 09/21/11 13:17:09 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.10/amp_conf/htdocs/admin/assets/js/pbxlib.js.php
r12496 r12625 4 4 header('Expires: ' . date('r', strtotime('+1 year'))); 5 5 header('Last-Modified: ' . date('r', strtotime('-1 year'))); 6 ob_start( 'ob_gzhandler');6 ob_start(ob_gzhandler); 7 7 ?> 8 8 … … 108 108 if(password.match(/[a-z].*[a-z]/i)==null||password.match(/\d\D*\d/)==null){alert(fpbx.msg.framework.weakSecret.types);return true;} 109 109 return false;} 110 $.urlParam=function(name){var match=new RegExp('[\\?&]'+name+'=([^&#]*)').exec(window.location.search);return match&&decodeURIComponent(match[1].replace(/\+/g,' '));} 110 111 function bind_dests_double_selects(){$('.destdropdown').unbind().bind('blur click change keypress',function(){var name=$(this).attr('name');var id=name.replace('goto','');var dest=$(this).val();$('[name$='+id+'].destdropdown2').hide();$('[name='+dest+id+'].destdropdown2').show();});$('.destdropdown').bind('change',function(){if($(this).find('option:selected').val()=='Error'){$(this).css('background-color','red');}else{$(this).css('background-color','white');}});} 111 112 function fpbx_reload_confirm(){if(!fpbx.conf.RELOADCONFIRM){fpbx_reload();} … … 130 131 $('.rnav > ul').menu();$('.radioset').buttonset();$('.menubar').show().menubar();if(fpbx.conf.reload_needed){toggle_reload_button('show');} 131 132 $('.sortable').menu();$('.ui-menu-item').click(function(){go=$(this).find('a').attr('href');if(go&&!$(this).find('a').hasClass('ui-state-disabled')){document.location.href=go;}}) 132 $('#button_reload').click(function(){if(fpbx.conf.RELOADCONFIRM ){fpbx_reload_confirm();}else{fpbx_reload();}});$('input[type=submit],input[type=button], button, input[type=reset]').each(function(){var prim=(typeof $(this).data('button-icon-primary')=='undefined')?'':($(this).data('button-icon-primary'));var sec=(typeof $(this).data('button-icon-secondary')=='undefined')?'':($(this).data('button-icon-secondary'));var txt=(typeof $(this).data('button-text')=='undefined')?'true':($(this).data('button-text'));var txt=(txt=='true')?true:false;$(this).button({icons:{primary:prim,secondary:sec},text:txt});});$('#modules_button').next('ul').remove();$('#modules_button').toggle(function(){$('#module_list').show();},function(){$('#module_list').hide();})133 $(document).bind('keydown','meta+shift+a',function(){$('#modules_button').trigger('click');});$(document).bind('keydown','meta+shift+s',function(){});$(document).bind('keydown','meta+shift+x',function(){});$('#user_logout').click(function(){url=window.location.origin+window.location.pathname;$.get(url+'?logout=true',function(){$.cookie('PHPSESSID',null);window.location=url;});}) });133 $('#button_reload').click(function(){if(fpbx.conf.RELOADCONFIRM=='true'){fpbx_reload_confirm();}else{fpbx_reload();}});$('#BRAND_IMAGE_FREEPBX_LEFT').click(function(){window.open(fpbx.conf.BRAND_IMAGE_FREEPBX_LINK_LEFT,'_newtab');});$('input[type=submit],input[type=button], button, input[type=reset]').each(function(){var prim=(typeof $(this).data('button-icon-primary')=='undefined')?'':($(this).data('button-icon-primary'));var sec=(typeof $(this).data('button-icon-secondary')=='undefined')?'':($(this).data('button-icon-secondary'));var txt=(typeof $(this).data('button-text')=='undefined')?'true':($(this).data('button-text'));var txt=(txt=='true')?true:false;$(this).button({icons:{primary:prim,secondary:sec},text:txt});});$('#modules_button').next('ul').remove();$('#modules_button').toggle(function(){$('#module_list').show();},function(){$('#module_list').hide();}) 134 $(document).bind('keydown','meta+shift+a',function(){$('#modules_button').trigger('click');});$(document).bind('keydown','meta+shift+s',function(){});$(document).bind('keydown','meta+shift+x',function(){});$('#user_logout').click(function(){url=window.location.origin+window.location.pathname;$.get(url+'?logout=true',function(){$.cookie('PHPSESSID',null);window.location=url;});});}); 134 135 (function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;} 135 136 var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text")){return;} freepbx/branches/2.10/buildtools/pack_javascripts.php
r12544 r12625 1 1 #!/usr/bin/php -q 2 2 <?php 3 4 //include database conifguration5 $bootstrap_settings['skip_astman'] = true;6 $restrict_mods = true;7 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) {8 include_once('/etc/asterisk/freepbx.conf');9 }10 3 11 4 $libfreepbx = '../amp_conf/htdocs/admin/assets/js/pbxlib.js.php'; … … 21 14 * $finalB is then merged with $final, with $finalB being put first 22 15 */ 16 17 $skip = array( 18 "|$dir/progress-polyfill.min.js|", 19 "|$dir/jquery-.*\.js|", 20 "|$dir/jquery-ui-.*\.js$|" 21 ); 23 22 foreach ($output as $file) { 23 24 //skip the files in the skip array 25 foreach ($skip as $s) { 26 if (preg_match($s, $file)) { 27 continue 2; 28 } 29 } 30 31 //add files 24 32 switch(true){ 25 case preg_match("|$dir/jquery-.*\.js|",$file)://jquery26 case 'progress-polyfill.min.js'://no need to minimize - for ie only27 //$finalB[] = $file;28 break;29 33 case preg_match("|$dir/jquery.cookie.js$|",$file)://jquery ui 30 34 $finalB[] = $file; 31 break;32 case preg_match("|$dir/jquery-ui-.*\.js$|",$file)://jquery ui33 //$finalB[] = $file;34 35 break; 35 36 case $file==$dir.'/script.legacy.js'://legacy script … … 52 53 header('Expires: ' . date('r', strtotime('+1 year'))); 53 54 header('Last-Modified: ' . date('r', strtotime('-1 year'))); 54 ob_start( '" . $amp_conf['buffering_callback'] . "');55 ob_start(ob_gzhandler); 55 56 ?> 56 57 ";
