Beispiel #1
0
 public function index()
 {
     $this->view->filetree = filetree::php_file_tree(Kohana::config('freeswitch.cfg_root'), "javascript:FileManager.load('[link]');", array('xml', 'conf', 'tpl'));
     javascript::add('php_file_tree_jquery.js');
     stylesheet::add('php_file_tree.css');
     javascript::add('editarea/edit_area_full.js');
 }
Beispiel #2
0
 public function index()
 {
     stylesheet::add('esl', 50);
     javascript::add('pubsub.js', 50);
     //CLEAR THE ESL SESSION
     $_SESSION['esl'] = array();
 }
Beispiel #3
0
 public function __construct()
 {
     parent::__construct();
     javascript::add('editarea/edit_area_full.js');
     javascript::add('featurecode.js');
     stylesheet::add('featurecode.css');
 }
Beispiel #4
0
    public function __construct()
    {
        parent::__construct();

        stylesheet::add('autoattendant', 50);

        javascript::add('mustache');
    }
Beispiel #5
0
 public function index()
 {
     $this->template->content = new View('globalmedia/index');
     javascript::add('php_file_tree_jquery.js');
     stylesheet::add('php_file_tree.css');
     // Collect a list of paths in the system, to be displayed as a list
     $this->view->filetree = filetree::php_file_tree(Media::getMediaPath(), "javascript:filterPath('[link]');", FALSE, '/^8000$|^16000$|^32000$|^48000$/');
     // Build a grid with a hidden device_id, device_type, and add an option for the user to select the display columns
     $this->grid = jgrid::grid($this->baseModel, array('caption' => ' ', 'gridName' => 'MediaGrid'))->add('mediafile_id', 'ID', array('width' => '80', 'hidden' => true, 'key' => true))->add('file', 'Filename', array('width' => '40', 'search' => true, 'callback' => array('MediaFile', 'getBaseName')))->add('path', 'Path', array('width' => '80', 'hidden' => true, 'key' => true, 'search' => true))->add('description', 'Description', array('width' => '80', 'search' => true))->add('size', 'File Size', array('width' => '40', 'align' => 'right', 'callback' => array('function' => array('MediaFile', 'getSize'), 'arguments' => 'registry')))->add('length', 'Length', array('width' => '40', 'align' => 'right', 'callback' => array('function' => array('MediaFile', 'getLength'), 'arguments' => 'registry')))->navButtonAdd('Columns', array('onClickButton' => 'function () {  $(\'#{table_id}\').setColumns(); }', 'buttonimg' => url::base() . 'assets/css/jqGrid/table_insert_column.png', 'title' => 'Show/Hide Columns', 'noCaption' => true, 'position' => 'first'))->addAction('globalmedia/details', 'Details', array('arguments' => 'mediafile_id', 'attributes' => array('class' => 'qtipAjaxForm')))->addAction('globalmedia/download', 'Download', array('arguments' => 'mediafile_id'))->addAction('globalmedia/delete', 'Delete', array('width' => '60', 'arguments' => 'mediafile_id'));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     // Produces the grid markup or JSON
     $this->view->grid = $this->grid->produce();
 }
 public function reorder($album_id = NULL)
 {
     $album = new Album_Model($album_id);
     if (!$album->id) {
         Event::run('system.404');
     }
     javascript::add(array('jquery-ui', 'photo_admin_effects'));
     stylesheet::add(array('photo_gallery'));
     $this->template->title = $album->album_name;
     $this->template->heading = $album->album_name;
     $this->template->content = new View('admin/album/reorder');
     $this->template->content->photos = $album->find_related('photos', array(), array('photo_order' => 'ASC'));
     $this->template->content->album = $album;
 }
 public function view($album_name = NULL)
 {
     javascript::add(array('jquery.colorbox', 'photo_effects'));
     stylesheet::add(array('colorbox', 'colorbox-custom', 'photo_gallery'));
     $page_num = $this->input->get('page', 1);
     $album = new Album_Model($album_name);
     if (!$album->id) {
         Event::run('system.404');
     }
     $this->template->title = $album->album_name;
     $this->template->heading = $album->album_name;
     $this->template->content = new View('album/view');
     $this->template->content->photos = $album->find_photos($page_num);
     $this->template->content->album = $album;
     $this->template->content->num_pages = ceil(count($album->find_related('photos')) / Kohana::config('photo_gallery.photos_per_page'));
 }
Beispiel #8
0
 public function index()
 {
     stylesheet::add('esl', 50);
     $this->view->sofia_status = '';
     $sipInterface = Doctrine::getTable('SipInterface')->findAll();
     foreach ($sipInterface as $interface) {
         $this->view->sofia_status .= form::button(array('id' => 'sofia_profile', 'class' => 'eslEvent', 'value' => 'SIP Interface ' . $interface->sipinterface_id . ' Status', 'param' => 'sipinterface_' . $interface->sipinterface_id));
     }
     $this->view->trunk_status = '';
     $trunks = Doctrine::getTable('Trunk')->findAll();
     foreach ($trunks as $trunk) {
         $this->view->trunk_status .= form::button(array('id' => 'gateway_profile', 'class' => 'eslEvent', 'value' => 'Trunk ' . $trunk->trunk_id . ' Status', 'param' => 'trunk_' . $trunk->trunk_id));
     }
     $eslManager = new EslManager();
     $this->view->isConnected = $eslManager->isConnected();
     $this->view->isExtension = $eslManager->isExtension();
 }
Beispiel #9
0
 public function index()
 {
     stylesheet::add('switchboard', 50);
     javascript::add('pubsub.js', 50);
     $this->view->sofia_status = '';
     $sipInterface = Doctrine::getTable('SipInterface')->findAll();
     foreach ($sipInterface as $interface) {
         $this->view->sofia_status .= form::button(array('id' => 'sofia_profile', 'class' => 'eslEvent', 'value' => 'SIP Interface ' . $interface->sipinterface_id . ' Status', 'param' => 'sipinterface_' . $interface->sipinterface_id));
     }
     $this->view->trunk_status = '';
     $trunks = Doctrine::getTable('Trunk')->findAll();
     foreach ($trunks as $trunk) {
         $this->view->trunk_status .= form::button(array('id' => 'gateway_profile', 'class' => 'eslEvent', 'value' => 'Trunk ' . $trunk->trunk_id . ' Status', 'param' => 'trunk_' . $trunk->trunk_id));
     }
     //CLEAR THE ESL SESSION
     $_SESSION['esl'] = array();
 }
Beispiel #10
0
 public function index()
 {
     stylesheet::add('callcenter');
     javascript::add('callcenter');
     javascript::add('jquery-ui-1-7-2-custom');
     // Prepare device info for use
     $device_info = array();
     $location_id = users::getAttr('location_id');
     $location = Doctrine::getTable('Location')->findOneBy('location_id', $location_id);
     foreach ($location['User'] as $user) {
         foreach ($user['Device'] as $device) {
             $device_info[] = array('name' => $device['name'], 'id' => $device['device_id']);
         }
     }
     $this->view->devices = $device_info;
     $this->view->domain = $location['domain'];
 }
Beispiel #11
0
 public function index()
 {
     stylesheet::add('packagemanager');
     $messages = array('error' => NULL, 'warning' => NULL, 'notice' => NULL, 'ok' => NULL);
     $this->view->displayParameters = $this->displayParameters;
     $this->view->messages = $messages;
     $this->view->catalog = Package_Manager::getDisplayList();
     $messages = Package_Message::get();
     if (is_array($messages)) {
         $this->view->messages = $messages;
     } else {
         $this->view->messages = array();
     }
     foreach (Package_Catalog::getCatalog() as $identifier => $package) {
         kohana::log('debug', $identifier . ' => ' . $package['packageName'] . ' version ' . $package['version']);
     }
     Package_Message::clear();
 }
Beispiel #12
0
 public function index()
 {
     // set the title
     $this->view->title = __('Manage Permissions');
     // include our stylesheet
     stylesheet::add('permission', 50);
     // if this form is submitted
     if ($this->submitted()) {
         // get the user id out of the post
         $userID = $this->input->post('user_id', 0);
         // get the current permissions in the model
         $this->Permissions = Doctrine::getTable($this->baseModel)->findByUserId($userID);
         // foreach of the post vars build an array we can sync to the
         // users permissiongs
         $permissions = array();
         foreach ($_POST as $module => $permission) {
             // fix php weirdness
             $permission = (array) $permission;
             // if this is not a module_permission post var then skip
             if (empty($permission['module_permissions']) || $permission['module_permissions'] == 'full') {
                 continue;
             }
             $modulePermission = $permission['module_permissions'];
             // if the module has custom permissions
             if ($modulePermission == 'custom') {
                 // foreach of the modules views create a permission
                 foreach ($permission['customize'] as $method => $customize) {
                     $permissions[] = array('user_id' => $userID, 'controller' => $module, 'method' => $method, 'permission' => $customize);
                 }
             }
             // set the modules global permission
             $permissions[] = array('user_id' => $userID, 'controller' => $module, 'permission' => $modulePermission);
         }
         // sync this back with the permission model and save
         $this->Permissions->synchronizeWithArray($permissions);
         $this->Permissions->save();
     }
 }
Beispiel #13
0
    public function __construct()
    {
        parent::__construct();

        stylesheet::add('netlist', 40);
    }
Beispiel #14
0
 public static function renderLinks($inline = FALSE, $index = FALSE)
 {
     // build a var with the included css files
     $styles = self::$stylePaths;
     self::$stylePaths = array();
     // Get the session so we can track what assets are on the page
     $session = Session::instance();
     // If this is a full page load (ie not ajax) then there are no assest already on page
     if (!request::is_ajax()) {
         $session->delete('stylesheet.onPageAssets');
     }
     // Initialize the vars to track what has been added, and convience wrappers
     $onPageAssets = $session->get('stylesheet.onPageAssets', array());
     // loop all the css includes and determine what needs to go on this page
     // and in what order
     $styleOutputBuffer = array();
     foreach ($styles as $cond => $condblock) {
         // sort this condblock of style paths by weight
         ksort($condblock);
         $styleOutputBuffer[$cond] = array();
         foreach ($condblock as $stylePaths) {
             // make sure there are no duplicates in this array
             $stylePaths = array_unique($stylePaths);
             // make sure these css links are not already on the page
             // via ajax/parent or in another weight category (lowest weight wins)
             $stylePaths = array_diff($stylePaths, $onPageAssets);
             // add the filtered list to the array of assets to put on the page
             $styleOutputBuffer[$cond] = array_merge($styleOutputBuffer[$cond], $stylePaths);
             // keep track of what we add to the pages
             $onPageAssets = array_merge($onPageAssets, $stylePaths);
         }
     }
     // NOTICE: setting $session here causes segfault during ajax
     // made a hack to move this set outside the event .....
     Bluebox_Controller::$onPageAssets['css'] = $onPageAssets;
     //$session->set('stylesheet.onPageAssets', $onPageAssets);
     // run through everything that needs to be on the page and
     // make in conditional where apropriate then convert them into css links
     $linkList = '';
     foreach ($styleOutputBuffer as $cond => $stylePaths) {
         // if all the includes are already on page move on
         if (empty($stylePaths)) {
             continue;
         }
         // create the css links
         $links = html::stylesheet($stylePaths, 'screen', $index);
         // if these are conditional css pages then wrap the links
         // in the conditional statement
         if (array_key_exists($cond, self::$cssconditional)) {
             $links = sprintf(self::$cssconditional[$cond], "\n" . rtrim($links, "\n") . "\n");
         }
         // add these links to our string
         $linkList .= $links;
     }
     // are we displaying this inline or returning the string
     if ($inline) {
         echo $linkList;
     } else {
         return $linkList;
     }
 }
Beispiel #15
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add('fax', 50);
 }
Beispiel #16
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add('callmanager', 50);
 }
Beispiel #17
0
 public static function addCssAssets()
 {
     // Check if the jquery helper was initialized
     if (empty(jquery::$jquery)) {
         return;
     }
     $jqPlugins = jquery::$jqPlugins;
     // Load any additional jquery plugins
     foreach (jquery::$jquery->plugins as $plugin) {
         // Check if we need a css tag for this asset
         if (empty($jqPlugins[$plugin]['css'])) {
             continue;
         }
         $stylesheets = $jqPlugins[$plugin]['css'];
         foreach ((array) $stylesheets as $css) {
             // Is this a plugin that's part of a module? If so, assume all paths are already specified
             if (isset($jqPlugins[$plugin]['module'])) {
                 stylesheet::add($jqPlugins[$plugin]['module'] . '/' . $css, 20);
             } else {
                 // If no directory is specified then assume assets/css/jquery/{skinName}
                 if (stripos($css, '/') === false) {
                     $css = 'jquery/' . jquery::$skinName . '/' . $css;
                 }
                 stylesheet::add($css, 30);
             }
         }
     }
 }
Beispiel #18
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add('callcenter_agents', 50);
 }
Beispiel #19
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add('powerdns', 50);
 }
Beispiel #20
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add('jslider', 50);
     javascript::add(array('jquery.dependClass.js', 'jquery.slider.js'), 50);
 }
Beispiel #21
0
 public function index()
 {
     stylesheet::add('logviewer', 50);
 }
Beispiel #22
0
 public function __construct()
 {
     parent::__construct();
     stylesheet::add("directory.css");
 }
Beispiel #23
0
        <title>
            Bluebox<?php 
if (strlen($title) > 0) {
    echo ' : ' . $title;
}
?>
        </title>

        <?php 
stylesheet::add(array('reset', 'layout', 'navigation', 'screen', 'forms'), 10);
?>
        <?php 
stylesheet::add('jquery.custom.css', 31);
?>
        <?php 
stylesheet::add('ie', array('cond' => 'ie', 'weight' => 10));
?>

        <?php 
jquery::addPlugin(array('persistent', 'scrollTo', 'growl', 'qtip', 'infiniteCarousel', 'dropdowns', 'blockUI', 'form'));
?>
        <?php 
javascript::add('bluebox');
?>

        <?php 
echo $css;
?>
        <?php 
echo $js;
?>