Changeset 10648

Show
Ignore:
Timestamp:
12/04/10 16:34:27 (2 years ago)
Author:
mbrevda
Message:

closes #4616; closing fo rnow as this fis is reather harmless, im more concerened about the algorithm to detarmain the proper base, but nothing iwll break as a result of this. Reopen if there is a better way

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/bootstrap/amp_conf/htdocs/admin/views/freepbx.php

    r10543 r10648  
    4646} 
    4747 
     48$base = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); 
     49$base .= "://".$_SERVER['HTTP_HOST']; 
     50$base .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']); 
     51$base = trim($base, '/') . '/'; 
    4852 
    4953?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
     
    5559  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
    5660  <meta http-equiv="X-UA-Compatible" content="chrome=1" /> 
     61  <base href="<?php echo $base; ?>" /> 
    5762  <link href="common/mainstyle.css" rel="stylesheet" type="text/css" /> 
    5863<?php if (isset($use_nav_background) && $use_nav_background) { ?> 
  • modules/branches/bootstrap-2.9/directory/page.directory.php

    r9895 r10648  
    3636directory_drawListMenu(); 
    3737 
     38?> 
     39<script type="text/javascript"> 
     40$(document).ready(function() { 
     41 $('#new_dir').click(function(){ 
     42  window.location.href=$('base').attr('href') + '/config.php?type=<?php echo $type ?>&display=directory&action=add'; 
     43  }) 
     44}); 
     45</script> 
     46<?php 
    3847if($action=='' && $id==''){ 
    3948  echo '<h2 id="title">Directory</h2>'; 
    40   echo '<br /><br /><input type="button" value="'._('Add a new Directory').'" onclick="window.location.href=\'/admin/config.php?type='.$type.'&display=directory&action=add\';"/>'; 
     49  echo '<br /><br /><input type="button" value="'._('Add a new Directory').'" id="new_dir"/>'; 
    4150  echo '<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />'; 
    4251}