Changeset 12716

Show
Ignore:
Timestamp:
09/27/11 12:33:39 (2 years ago)
Author:
mbrevda
Message:

re #5342 - more gui tweaks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/amp_conf/htdocs/admin/assets/js/pbxlib.js.php

    r12688 r12716  
    125125function freepbx_reload_error(txt){var box=$('<div></div>').html(txt).dialog({title:'Error!',resizable:false,modal:true,minWidth:600,position:['center',50],close:function(e){$(e.target).dialog("destroy").remove();},buttons:[{text:fpbx.msg.framework.retry,click:function(){$(this).dialog("destroy").remove();fpbx_reload();}},{text:fpbx.msg.framework.cancel,click:function(){$(this).dialog("destroy").remove();}}]});$('#error_more_info').click(function(){$(this).next('pre').show();$(this).hide();return false;})} 
    126126function toggle_reload_button(action){switch(action){case'show':$('#button_reload').show().css('display','inline-block');break;case'hide':$('#button_reload').hide();break;}} 
    127 $(document).ready(function(){bind_dests_double_selects();$("a.info").each(function(){$(this).after('<span class="help">?<span>'+$(this).find('span').html()+'</span></span>');}) 
     127$(document).ready(function(){bind_dests_double_selects();$("a.info").each(function(){$(this).after('<span class="help">?<span>'+$(this).find('span').html()+'</span></span>');$(this).find('span').remove();$(this).replaceWith($(this).text())}) 
    128128$(".help").live('mouseenter',function(){side=fpbx.conf.text_dir=='lrt'?'left':'right';var pos=$(this).offset();var offset=(200-pos.side)+"px";$(this).find("span").css(side,offset).stop(true,true).delay(500).animate({opacity:"show"},750);}).live('mouseleave',function(){$(this).find("span").stop(true,true).animate({opacity:"hide"},"fast");});$('.guielToggle').click(function(){var txt=$(this).find('.guielToggleBut');var el=$(this).data('toggle_class');switch(txt.text().replace(/ /g,'')){case'-':txt.text('+ ');$('.'+el).hide() 
    129129break;case'+':txt.text('-  ');$('.'+el).show();break;}}) 
     
    131131$('.rnav > ul').menu();$('.radioset').buttonset();$('.menubar').show().menubar();if(fpbx.conf.reload_needed){toggle_reload_button('show');} 
    132132$('.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;}}) 
    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;});});}); 
     133$('#button_reload').click(function(){if(fpbx.conf.RELOADCONFIRM=='true'){fpbx_reload_confirm();}else{fpbx_reload();}});$('#BRAND_IMAGE_FREEPBX_LEFT').click(function(){window.open($(this).data('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});});$(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;});});}); 
    135134(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;} 
    136135var 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/amp_conf/htdocs/admin/assets/js/script.legacy.js

    r12713 r12716  
    696696  bind_dests_double_selects(); 
    697697   
    698   //help tags. based on: http://www.dvq.co.nz/jquery/create-a-jquery-popup-bubble-effect/ 
     698  //help tags 
    699699  $("a.info").each(function(){ 
    700700    $(this).after('<span class="help">?<span>' + $(this).find('span').html() + '</span></span>'); 
     701    $(this).find('span').remove(); 
     702    $(this).replaceWith($(this).text()) 
    701703  }) 
     704   
    702705  $(".help").live('mouseenter', function(){ 
    703706      side = fpbx.conf.text_dir == 'lrt' ? 'left' : 'right'; 
  • freepbx/branches/2.10/amp_conf/htdocs/admin/config.php

    r12714 r12716  
    123123  $header['title']  = framework_server_name(); 
    124124  $header['amp_conf'] = $amp_conf; 
    125   $fw_gui_html .=     load_view(dirname(__FILE__) . '/views/header.php', $header); 
     125  $fw_gui_html .=     load_view($amp_conf['VIEW_HEADER'], $header); 
    126126   
    127127  if (isset($no_auth)) { 
    128     $fw_gui_html .= load_view(dirname(__FILE__) . $amp_conf['VIEW_MENU'], $header); 
     128    $fw_gui_html .= load_view($amp_conf['VIEW_MENU'], $header); 
    129129    $fw_gui_html .= $no_auth; 
    130     $fw_gui_html .= load_view($amp_conf['VIEW_FOOTER'], array('no_auth' => $no_auth)); 
     130    $footer['footer_content'] = load_view($amp_conf['VIEW_FOOTER_CONTENT']); 
     131    $footer['no_auth']  = $no_auth; 
     132    $fw_gui_html .= load_view($amp_conf['VIEW_FOOTER'], $footer); 
    131133    echo $fw_gui_html; 
    132134    exit(); 
     
    370372  $footer['benchmark_starttime']  = $benchmark_starttime; 
    371373  $footer['reload_needed']    = check_reload_needed(); 
    372   $fw_gui_html .=           load_view($amp_conf['VIEW_FOOTER'], $footer); 
     374  $footer['footer_content']   = load_view($amp_conf['VIEW_FOOTER_CONTENT'], $footer); 
     375  $fw_gui_html          .= load_view($amp_conf['VIEW_FOOTER'], $footer); 
    373376 
    374377 
  • freepbx/branches/2.10/amp_conf/htdocs/admin/views/footer.php

    r12657 r12716  
    22global $amp_conf; 
    33global $module_name, $active_modules; 
    4  
    5 $html = ''; 
    6 $html .= '</div>';//page_body 
    7 $html .= '<div id="footer"><hr />'; 
    8 $html .= '<div id="footer_content">'; 
    9 $html .= '<div id="footer_content_fpbx">'; 
    104$version   = get_framework_version(); 
    115$version_tag = '?load_version=' . urlencode($version); 
     
    1711} 
    1812 
    19  
    20 // Brandable logos in footer 
    21 //fpbx logo 
    22 $html .= '<a target="_blank" href="' . $amp_conf['BRAND_IMAGE_FREEPBX_LINK_FOOT']. '">' 
    23     . '<img id="footer_logo" src="'.$amp_conf['BRAND_IMAGE_FREEPBX_FOOT'].$version_tag 
    24     . '" alt="'.$amp_conf['BRAND_FREEPBX_ALT_FOOT'] .'"/></a>'; 
    25  
    26 //fpbx data 
    27 $html .= '<span class="footer-float-left">'; 
    28 $html .= '<a href="http://www.freepbx.org" target="_blank">FreePBX</a> '  
    29     . _('is a registered trademark of')  
    30       . '<a href="http://www.freepbx.org/copyright.html" target="_blank"> Bandwidth.com</a>' 
    31     . br(); 
    32 $html .= _('FreePBX') . ' ' . $version . ' ' . _('is licensed under') 
    33     . '<a href="http://www.gnu.org/copyleft/gpl.html" target="_blank"> GPL</a>'; 
    34  
    35 //module license 
    36 if (!empty($active_modules[$module_name]['license'])) { 
    37   $html .= br() . sprintf(_('Current module licensed under %s'), 
    38   trim($active_modules[$module_name]['license'])); 
    39 
    40  
    41 //benchmarking 
    42 if (isset($amp_conf['DEVEL']) && $amp_conf['DEVEL']) { 
    43   $benchmark_time = number_format(microtime_float() - $benchmark_starttime, 4); 
    44   $html .= '<br><span id="benchmark_time">Page loaded in ' . $benchmark_time . 's</span>'; 
    45 
    46 $html .= br() . _('Sponsored by:'); 
    47 $html .= '<a href="http://www.bandwidth.com" target="_blank">Bandwidth.com</a>' . br(); 
    48 $html .= '</span>'; 
    49 $html .= '</div>'; //footer_content_fpbx 
    50  
    51 //sponsors 
    52 $html .= '<div id="footer_content_sponsor" class="footer-float-left">'; 
    53  
    54 $html .= '<a target="_blank" href="http://www.schmoozecom.com">' 
    55     . '<img id="footer_logo" src="images/schmooze-logo.png" ' 
    56     . ' style="margin-right:10px"' 
    57     . 'alt="www.schmoozecom.com"/></a>'; 
    58 $html .= '<span class="footer-float-left">'; 
    59 $html .= _('The FreePBX project is sponsored in part by:') . br(); 
    60 $html .= '<a href="http://www.schmoozecom.com" target="_blank">Schmooze Com., Inc.</a>' . br(); 
    61 $html .= 'Proud sponsors, contributors, ' . br() 
    62     . _('and providers of')  
    63     . ' <a href="http://www.freepbx.org/support-and-professional-services">' 
    64     . _('Professional Support & Services') . '</a>'; 
    65 //$html .= _('All Rights Reserved'); 
    66 $html .= '</div>'; //footer_content_sponsor 
     13$html = ''; 
     14$html .= '</div>';//page_body 
     15$html .= '<div id="footer"><hr />'; 
     16$html .= '<div id="footer_content">'; 
     17$html .= $footer_content; 
    6718$html .= '</div>'; //footer_content 
    6819$html .= '</div>'; //footer 
     
    12778    . '<script type="text/javascript" src="assets/js/tabber-minimized.js"></script>'; 
    12879} 
     80if ($amp_conf['BRAND_ALT_JS']) { 
     81  $html .= '<script type="text/javascript" src="' . $amp_conf['BRAND_ALT_JS'] . '"></script>'; 
     82} 
    12983 
    13084if (isset($module_name) && $module_name != '') { 
  • freepbx/branches/2.10/amp_conf/htdocs/admin/views/menu.php

    r12713 r12716  
    55$out .= '<div id="header">'; 
    66$out .= '<div class="menubar ui-widget-header ui-corner-all">'; 
    7 /*$out .= '<a href="http://www.freepbx.org" target="_blank"' 
    8   . 'data-button-icon-secondary="ui-icon-extlink">' 
    9   . '<img src="' . $amp_conf['BRAND_IMAGE_FREEPBX_LEFT'] . '" alt="FreePBX" style="float:left;height:21px"/></a>'; 
    10 */ 
     7//left hand logo 
    118$out .= '<img src="' . $amp_conf['BRAND_IMAGE_FREEPBX_LEFT']  
    129    . '" alt="FreePBX" title="FreePBX" id="BRAND_IMAGE_FREEPBX_LEFT" ' 
  • freepbx/branches/2.10/upgrades/2.10alpha1/migration.php

    r12713 r12716  
    2121); 
    2222$freepbx_conf->define_conf_setting('buffering_callback', $set); 
    23 $freepbx_conf->commit_conf_settings(); 
    2423 
    2524$set = array( 
     
    3736); 
    3837$freepbx_conf->define_conf_setting('MODULE_REPO', $set); 
    39 $freepbx_conf->commit_conf_settings(); 
    4038 
    4139//login view 
     
    5452); 
    5553$freepbx_conf->define_conf_setting('VIEW_LOGIN', $set); 
    56 $freepbx_conf->commit_conf_settings(); 
    57  
    5854 
    5955//menu 
     
    7268); 
    7369$freepbx_conf->define_conf_setting('VIEW_MENU', $set); 
    74 $freepbx_conf->commit_conf_settings(); 
    7570 
    7671//jquery ui css 
     
    8984); 
    9085$freepbx_conf->define_conf_setting('JQUERY_CSS', $set); 
    91 $freepbx_conf->commit_conf_settings(); 
     86 
     87//header 
     88$set = array( 
     89    'value'     => 'views/header.php', 
     90    'defaultval'  => 'views/header.php', 
     91    'readonly'    => 1, 
     92    'hidden'    => 1, 
     93    'level'     => 10, 
     94    'module'    => '', 
     95    'category'    => 'Styling and Logos', 
     96    'emptyok'   => 0, 
     97    'name'      => 'View: header.php', 
     98    'description' => 'header.php view. This should never be changed except for very advanced layout changes', 
     99    'type'      => CONF_TYPE_TEXT 
     100); 
     101$freepbx_conf->define_conf_setting('VIEW_HEADER', $set); 
    92102 
    93103//footer 
     
    106116); 
    107117$freepbx_conf->define_conf_setting('VIEW_FOOTER', $set); 
    108 $freepbx_conf->commit_conf_settings(); 
     118 
     119//footer content 
     120$set = array( 
     121    'value'     => 'views/footer_content.php', 
     122    'defaultval'  => 'views/footer_content.php', 
     123    'readonly'    => 1, 
     124    'hidden'    => 1, 
     125    'level'     => 10, 
     126    'module'    => '', 
     127    'category'    => 'Styling and Logos', 
     128    'emptyok'   => 0, 
     129    'name'      => 'View: footer_content.php', 
     130    'description' => 'footer_content.php view. This should never be changed except for very advanced layout changes', 
     131    'type'      => CONF_TYPE_TEXT 
     132); 
     133$freepbx_conf->define_conf_setting('VIEW_FOOTER_CONTENT', $set); 
    109134 
    110135//browser stats 
     
    124149); 
    125150$freepbx_conf->define_conf_setting('BROWSER_STATS', $set); 
    126 $freepbx_conf->commit_conf_settings(); 
     151 
     152//alt js 
     153$set = array( 
     154    'value'     => '', 
     155    'defaultval'  => '', 
     156    'readonly'    => 1, 
     157    'hidden'    => 1, 
     158    'level'     => 10, 
     159    'module'    => '', 
     160    'category'    => 'Styling and Logos', 
     161    'emptyok'   => 1, 
     162    'name'      => 'Alternate JS', 
     163    'description' => 'Alternate JS file, to supplement legacy.script.js', 
     164    'type'      => CONF_TYPE_TEXT 
     165); 
     166$freepbx_conf->define_conf_setting('BRAND_ALT_JS', $set); 
    127167 
    128168//set some settings 
     
    151191$freepbx_conf->remove_conf_settings('VIEW_FREEPBX_RELOAD'); 
    152192$freepbx_conf->remove_conf_settings('VIEW_FREEPBX_RELOADBAR'); 
    153 $freepbx_conf->remove_conf_settings('VIEW_FREEPBX_RELOADBAR'); 
    154193$freepbx_conf->remove_conf_settings('VIEW_UNAUTHORIZED'); 
    155194$freepbx_conf->remove_conf_settings('VIEW_LOGGEDOUT'); 
    156195$freepbx_conf->remove_conf_settings('VIEW_LOGGEDOUT'); 
    157  
     196$freepbx_conf->remove_conf_settings('BRAND_FREEPBX_ALT_RIGHT'); 
     197$freepbx_conf->remove_conf_settings('BRAND_IMAGE_FREEPBX_LINK_RIGHT'); 
     198$freepbx_conf->remove_conf_settings('BRAND_IMAGE_HIDE_NAV_BACKGROUND'); 
     199$freepbx_conf->remove_conf_settings('BRAND_HIDE_LOGO_RIGHT'); 
     200$freepbx_conf->remove_conf_settings('BRAND_HIDE_HEADER_MENUS'); 
     201$freepbx_conf->remove_conf_settings('BRAND_HIDE_HEADER_VERSION'); 
     202$freepbx_conf->remove_conf_settings('VIEW_REPORTS'); 
     203$freepbx_conf->remove_conf_settings('VIEW_PANEL'); 
     204 
     205//commit all settings 
     206$freepbx_conf->commit_conf_settings(); 
    158207//settings 
    159208global $amp_conf;