function compose($o)
 {
     if ($this->debug || $this->get->src) {
         $o = jquery::compose($o);
     }
     return parent::compose($o);
 }
 static function appear($element, $attrs = array())
 {
     jquery::load();
     //		jquery_plugin::assetic_load('wysibb');
     //		bors_use($path.css);
     //		jquery::plugin($path);
     //		http://cdn.wysibb.com/
     bors_use('http://cdn.wysibb.com/js/jquery.wysibb.min.js');
     bors_use('http://cdn.wysibb.com/css/default/wbbtheme.css');
     bors_use('http://cdn.wysibb.com/lang/ru.js');
     //		bors_use('/_bors-assets/balancer/bors-3rd-jquery-wysibb/preset/phpbb3.js');
     $attrs = $attrs ? blib_json::encode_jsfunc($attrs) : '';
     jquery::on_ready("\$('{$element}').wysibb({$attrs});");
     //		$theme = config('bower.path')."/jqjquery-wysibb/theme/default/wbbtheme.css";
     //		$theme = http://cdn.wysibb.com/css/default/wbbtheme.css;
     //		bors_page::add_template_data_array('head_append', "<link rel=\"stylesheet\" href=\"{$theme}\" />");
 }
Exemple #3
0
 /**
  * This function is used to populate the JSON response to
  * jquery.php.js
  *
  * @return void|string
  * @param bool $inline[optional] If false the json wrapped in a script tag is returned, otherwise it is echo'ed
  */
 public static function buildResponse($inline = true)
 {
     $script = '';
     if (!empty(jquery::$jquery)) {
         $script = javascript::codeBlock('    php.success(' . jquery::getResponse() . ', true);', array('inline' => $inline));
     }
     if ($inline) {
         echo $script;
     } else {
         return $script;
     }
 }
Exemple #4
0
			string = string.replace(/\s+$/,"");
			$(this).val(string);
		}

		$('#sip_password').change(trim);
		$('#sip_username').change(trim);
	});

</script>

<?php 
if (empty($sip['username']) and isset($trunk_options)) {
    ?>

    <?php 
    jquery::addPlugin(array('scrollTo', 'colorEffects'));
    ?>

    <?php 
    javascript::codeBlock();
    ?>

        $('#sip_username').change(function(e) {
            if ($(this).val() != '')
            {
                $('#sip_register').attr('checked', 'checked');

                $.scrollTo($('#sip_register'));

                $('#sip_register').siblings('.label').animate({backgroundColor: '#FCFF9F'}, 250).animate({backgroundColor: 'white'}, 1000);
 function compose($o)
 {
     $o = jquery::compose($o);
     return parent::compose($o);
 }
Exemple #6
0
echo __(' named ');
echo numbering::numbersDropdown(array('id' => 'number{{number_id}}_targets', 'name' => 'number{{number_id}}[dialplan][terminate][transfer]', 'forDependent' => TRUE), isset($terminate['transfer']) ? $terminate['transfer'] : NULL);
?>

        </div>

    </div>

    <input type="hidden" value="{{terminate_action}}" name="number{{number_id}}[dialplan][terminate][action]" id="number{{number_id}}_terminate_action"/>

<?php 
echo form::close_section();
?>

<?php 
jquery::addPlugin(array('accordion', 'dependent'));
?>

<script type="text/javascript">
    
    var actionIndex = $("#number{{number_id}}_no_answer_accordion h3 a").index($("#number{{number_id}}_no_answer_accordion h3 a[rel={{terminate_action}}]"));

    if (actionIndex < 0)
    {
        actionIndex = 0;
    }

    $("#number{{number_id}}_no_answer_accordion").accordion({ autoHeight: false, active: actionIndex });

    $("#number{{number_id}}_no_answer_accordion").bind("accordionchange", function(event, ui) {
Exemple #7
0
 public static function addCssAssets()
 {
     // if there is a jquery class avalible then get it to add any
     // css includes it needs at this time
     if (class_exists('jquery')) {
         jquery::addCssAssets();
     }
     // otherwise add our links to the events css collection string
     Event::$data['css'][] = self::renderLinks();
     // render any css code blocks in the header as well
     Event::$data['css'][] = self::renderCodeBlocks(FALSE);
 }
Exemple #8
0
 /**
  * __construct
  * contructor of jquery
  *
  * @return jqueryElement
  */
 public function __construct($selector)
 {
     jquery::addElement($this);
     $this->s = $selector;
 }
Exemple #9
0
?>

    <?php 
if (isset($views)) {
    echo subview::renderAsSections($views);
}
?>

    <?php 
echo form::close(TRUE);
?>

</div>

<?php 
jquery::addPlugin(array('dependent'));
?>

<script type="text/javascript" charset="utf-8">

    function calculateHours( value ){

        var hours = Math.floor( value / 60 );

        var mins = ( value - hours*60 );

        return (hours < 10 ? "0"+hours : hours) + ":" + ( mins == 0 ? "00" : mins );

    }

    $("#timeofday_time").slider({
Exemple #10
0
echo form::dropdown('type', array('sendRecv', 'recvEvent'));
?>
                
                <?php 
echo form::input('params');
?>

                <?php 
echo form::button(array('id' => 'manual_entry', 'param' => 'version', 'class' => 'eslEvent', 'value' => 'Send'));
?>
            </div>
    </div>
</div>

<?php 
jquery::addPlugin('accordion');
?>

<?php 
javascript::codeBlock();
?>
    var eslEvent = 'sdf';

    $("#esl").accordion({
        icons: {
            header: "ui-icon-circle-arrow-e",
            headerSelected: "ui-icon-circle-arrow-s"
        }
    });

    $(".eslEvent").bind("click", function() {
Exemple #11
0
 *
 * The Initial Developer of the Original Code is Michael Phillips <*****@*****.**>.
 *
 * Portions created by the Initial Developer are Copyright (C)
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 * Michael Phillips
 *
 *
 */
?>

<?php 
jquery::addPlugin('multiselect');
jquery::addQuery('.multiselect')->multiselect();
?>


<?php 
message::render();
?>
<div class="form">
<?php 
echo form::open();
?>
<fieldset>
<legend>
    Voicemail Blasting
</legend>
Exemple #12
0
 public static function chooseDestination($inputField, $currentDestination = NULL, $allowedTypes = NULL)
 {
     jquery::addPlugin('dialog');
 }
Exemple #13
0
			<?php 
echo __('Please Wait...');
?>
                    </div>
                    <?php 
echo html::image('skins/installer/assets/img/installing.gif', 'Installing please wait...');
?>
		</div>

		<input type="hidden" id="hidden_next" name="next" value="" />

    <?php 
echo form::close_section();
?>


<?php 
if (class_exists('jquery')) {
    jquery::addQuery('#noJS')->hide();
    jquery::addQuery('#next_Continue')->click('function () {
                $(\'#next_Continue\').hide();
                $(\'#prev_Back\').hide();
                $(\'.clickNext\').hide();
                $(\'.error\').hide();
                $(\'.inProgress\').show();
                $(\'#hidden_next\').val(\'next\');
                $(\'#installWizard\').submit();
                return true;
            }
        ');
}
Exemple #14
0
<?php

echo $js;
echo $css;
echo $content;
jquery::buildResponse();
Exemple #15
0
 public static function addJsAssets()
 {
     if (class_exists('jquery')) {
         jquery::addJsAssets();
     }
     Event::$data['js'][] = self::renderLinks();
 }
Exemple #16
0
 /**
  * Creates an HTML form dual list box element.
  * 
  * @param   string|array  input name or an array of HTML attributes
  * @param   array         select options, when using a name
  * @param   string|array  option key or list of keys that should be selected by default
  * @param   string        a string to be attached to the end of the attributes
  * @return  string
  */
 public static function dualListBox($data, $options, $selected = NULL, $extra = '')
 {
     // Add the Bluebox defaults (such as css classes)
     list($data, $options, $selected, $extra) = self::_addDefaults(__FUNCTION__, $data, $options, $selected, $extra);
     $data += array('useFilters' => 'true', 'filterUnselected' => true, 'filterSelected' => true, 'useCounters' => true, 'layout' => 'lefttoright', 'transferMode' => 'move', 'useSorting' => true, 'sortBy' => 'text', 'selectOnSubmit' => true, 'extra' => '', 'size' => '6');
     if (!empty($data['translate'])) {
         foreach ($options as $key => $value) {
             $options[$key] = self::_i18n($value);
         }
     }
     if (isset($data['translate'])) {
         unset($data['translate']);
     }
     if (is_array($selected)) {
         // Multi-select box
         $data['multiple'] = 'multiple';
     } else {
         // Single selection (but converted to an array)
         $selected = array($selected);
     }
     $box2id = $box1id = trim(preg_replace('/[^a-zA-Z0-9_{}]+/imx', '_', $data['name']), '_');
     jquery::addPlugin('dualListBox');
     $input = '<div id="dlbmainwrapper" class="dlbwrapper">';
     $configjs = '$.configureBoxes({';
     $unselectedlist = '<div id="dlbunwrapper" class="dlbwrapper">';
     $selectedlist = '<div id="dlbselwrapper" class="dlbwrapper">';
     if ($data['useFilters']) {
         if ($data['filterUnselected']) {
             $unselectedlist .= '<div id="' . $box1id . '_box1FilterWrapper" class="searchwrapper wrapper">Filter:<input type="text" id="' . $box1id . '_box1Filter" class="filterInput input"/><button type="button" class="actionbutton bluebutton" id="' . $box1id . '_box1Clear">X</button><select id="' . $box1id . '_box1Storage"></select></div>';
             $configjs .= 'box1Storage: \'' . $box1id . '_box1Storage\', box1Filter: \'' . $box1id . '_box1Filter\', box1Clear: \'' . $box1id . '_box1Clear\',  ';
         }
         if ($data['filterSelected']) {
             $selectedlist .= '<div id="' . $box2id . '_box2FilterWrapper" class="searchwrapper wrapper">Filter:<input type="text" id="' . $box2id . '_box2Filter" class="filterInput input"/><button type="button" class="actionbutton bluebutton" id="' . $box2id . '_box2Clear">X</button><select id="' . $box2id . '_box2Storage"></select></div>';
             $configjs .= 'box2Storage: \'' . $box2id . '_box2Storage\', box2Filter: \'' . $box2id . '_box2Filter\', box2Clear: \'' . $box2id . '_box2Clear\', ';
         }
         $configjs .= 'useFilters: true, ';
     } else {
         $configjs .= 'useFilters: false, ';
     }
     $unselectedlist .= '<div id="' . $box1id . '_box1ListboxWrapper" class="listboxwrapper wrapper"><select id="' . $box1id . '_box1View" name="' . $data['name'] . '_unsel[]" class="unsellistbox duallistbox" multiple="multiple" ' . $data['extra'];
     $selectedlist .= '<div id="' . $box2id . '_box2ListboxWrapper" class="listboxwrapper wrapper"><select id="' . $box2id . '_box2View" name="' . $data['name'] . '[]" class="sellistbox duallistbox" multiple="multiple" ' . $data['extra'];
     $configjs .= 'box1View: \'' . $box1id . '_box1View\', box2View: \'' . $box2id . '_box2View\',  ';
     if (isset($data['height'])) {
         $unselectedlist .= ' height="' . $data['height'] . '"';
         $selectedlist .= ' height="' . $data['height'] . '"';
     }
     if (isset($data['width'])) {
         $unselectedlist .= ' width="' . $data['width'] . '"';
         $selectedlist .= ' width="' . $data['width'] . '"';
     }
     if (isset($data['size'])) {
         $unselectedlist .= ' size="' . $data['size'] . '"';
         $selectedlist .= ' size="' . $data['size'] . '"';
     }
     $unselectedlist .= '>';
     $selectedlist .= '>';
     foreach ($options as $key => $value) {
         if (in_array($key, $selected)) {
             $selectedlist .= '<option value="' . $key . '">' . $value . '</option>';
         } else {
             $unselectedlist .= '<option value="' . $key . '">' . $value . '</option>';
         }
     }
     $unselectedlist .= '</select></div>';
     $selectedlist .= '</select></div>';
     if ($data['useCounters'] = true) {
         $unselectedlist .= '<div class="counterwrapper" id="' . $box1id . '_box1CounterWrapper"><span id="' . $box1id . '_box1Counter" class="countLabel"></span></div>';
         $selectedlist .= '<div class="counterwrapper" id="' . $box2id . '_box2CounterWrapper"><span id="' . $box2id . '_box2Counter" class="countLabel"></span></div>';
         $configjs .= 'useCounters: true, box1Counter: \'' . $box1id . '_box1Counter\', box2Counter: \'' . $box2id . '_box2Counter\', ';
     } else {
         $configjs .= 'useCounters: false, ';
     }
     $unselectedlist .= '</div>';
     $selectedlist .= '</div>';
     $actbuttons = '<div id="dlbactbutwrapper" class="dlbwrapper">';
     $actbuttons .= '<button id="' . $box2id . '_toright" type="button">&nbsp;&gt;&nbsp;</button><br>';
     $actbuttons .= '<button id="' . $box2id . '_alltoright" type="button">&gt;&gt;</button><br>';
     $actbuttons .= '<button id="' . $box1id . '_alltoleft" type="button">&lt;&lt;</button><br>';
     $actbuttons .= '<button id="' . $box1id . '_toleft" type="button">&nbsp;&lt;&nbsp;</button>';
     $actbuttons .= '</div>';
     if ($data['layout'] == 'lefttoright') {
         $input .= $unselectedlist . $actbuttons . $selectedlist;
         $configjs .= 'to1: \'' . $box1id . '_toleft\', ';
         $configjs .= 'to2: \'' . $box2id . '_toright\', ';
         $configjs .= 'allTo1: \'' . $box1id . '_alltoleft\', ';
         $configjs .= 'allTo2: \'' . $box2id . '_alltoright\', ';
     } else {
         $input .= $unselectedlist . $actbuttons . $selectedlist;
         $configjs .= 'to2: \'' . $box1id . '_toleft\', ';
         $configjs .= 'to1: \'' . $box2id . '_toright\', ';
         $configjs .= 'allTo2: \'' . $box1id . '_alltoleft\', ';
         $configjs .= 'allTo1: \'' . $box2id . '_alltoright\', ';
     }
     $configjs .= 'transferMode: \'' . $data['transferMode'] . '\', ';
     $configjs .= 'sortBy: \'' . $data['sortBy'] . '\', ';
     if ($data['useSorting']) {
         $configjs .= 'useSorting: true, ';
     } else {
         $configjs .= 'useSorting: false, ';
     }
     if ($data['selectOnSubmit']) {
         $configjs .= 'selectOnSubmit: true });';
     } else {
         $configjs .= 'selectOnSubmit: false });';
     }
     $input .= "\n" . javascript::codeBlock($configjs, array('inline' => true));
     return $input;
 }
Exemple #17
0
?>

    <?php 
if (isset($views)) {
    echo subview::renderAsSections($views);
}
?>

    <?php 
echo form::close(TRUE);
?>

</div>

<?php 
jquery::addPlugin(array('dependent', 'spinner'));
?>

<?php 
javascript::codeBlock(NULL, array('scriptname' => 'update_autoattendant'));
?>

    $('.type').bind('change', function () {

        $('.prompt').hide();

        var type = $('#autoattendant_registry_type').val();

        if (type != '') {

            $('#' + type + '_prompt').slideDown();
Exemple #18
0
    <?php 
}
?>

    <?php 
echo form::hidden('media[type]');
?>
</div>

<?php 
echo form::close_section();
?>

<?php 
jquery::addPlugin('tabs');
?>

<?php 
javascript::codeBlock();
?>

    var selected_type = $('#media_type_hidden').val();

    var selected_tab = $('a[href="#' + selected_type + '"]').parent();

    var selected = $('#media_tabs > ul li').index(selected_tab);

    if (selected < 0)
    {
        selected = 0;
Exemple #19
0
    <?php 
echo form::open_section('Softswitch Selection');
?>

        <div class="field">
        <?php 
echo form::label('tel_driver', 'Telephony Driver:');
echo form::dropdown('tel_driver', $drivers, $driver);
?>
        </div>

    <?php 
echo form::close_section();
?>



<?php 
// If the jquery exists use it to make it more interactive
if (class_exists('jquery')) {
    jquery::addPlugin('blockUI');
    jquery::addQuery('')->ajaxStop('$.unblockUI');
    jquery::addQuery('#tel_driver')->change('
            function () {
                $.blockUI({ message: \'<h2>' . __('Please Wait...') . '</h2>\' });
                $(\'#installWizard\').submit();
                return true;
            }
        ');
}
Exemple #20
0
        <ul id="permissionTree" class="filetree">

        </ul>
    </div>

    <div id="permissionForm" style="overflow: auto;">Please select a user</div>

    <div style="clear:both;">&nbsp;</div>

    <?php 
echo form::close(TRUE);
?>
</div>

<?php 
jquery::addPlugin(array('treeview', 'blockUI'));
?>

<?php 
javascript::codeBlock();
?>
    $('#permissionTree').treeview({ 
        url: '<?php 
echo url::site('permission/tree');
?>
'
    });
    
    $(document).ajaxStop(function () {
        $('.user').unbind('click').click(function (e) {
            e.preventDefault();
Exemple #21
0
 public function qtipAjaxReturn($data)
 {
     if ($data instanceof MediaFile) {
         $hide_rate = kohana::config('mediafile.hide_rate_folders');
         $id = $data->filepath(TRUE, !$hide_rate);
         $catalog = MediaFile::catalog();
         $value = $catalog[$id];
         jquery::addPlugin('growl');
         Session::instance()->get_once('bluebox_message', array());
         javascript::codeBlock('
             $(\'#media_widget_file_list\')
                 .prepend($("<option></option>")
                 .attr("selected", "selected")
                 .attr("value", "' . $id . '")
                 .text("' . $value . '"))
                 .trigger("change");
         ');
     }
     parent::qtipAjaxReturn($data);
 }
Exemple #22
0
}
?>
        </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;
?>

        <?php 
echo html::link('skins/bluebox/assets/img/favicon.ico', 'icon', 'image/x-icon');
?>
Exemple #23
0
 /**
  * Renders set session flash messages
  *
  * @param array an array of message types to render
  * @param array an array of rendering options, see function for details
  * @return array
  */
 public static function render($displayOnlyType = array(), $options = array())
 {
     // build up the default options
     /**
      * growl            If TRUE all errors are generate a growl message, this can be
      *                  disabled with FLASE or it can be an array of message types
      * growlTemplate    This is the growl JS statement, any arbitrary var used in
      *                  the second parameter of setMessage can be referenced via {foo}
      *                  defaults avaliable are {key}, {type}, and {text}
      * html             If TRUE all errors are generate a html message, this can be
      *                  disabled with FLASE or it can be an array of message types
      * htmlTemplate     This is the html markup, any arbitrary var used in
      *                  the second parameter of setMessage can be referenced via {foo}
      *                  defaults avaliable are {key}, {type}, and {text}
      * inline           If inline is true then this puts the messages outputs into
      *                  the buffer
      */
     $options += array('growl' => array('alert', 'info', 'success'), 'growlTemplate' => '$.jGrowl(\'{text}\', { theme: \'{type}\', life: 5000 });', 'html' => array('error'), 'htmlTemplate' => '<div class="{type}">{text}</div>', 'inline' => TRUE);
     // get the messages
     $flashMessages = Session::instance()->get_once('bluebox_message', array());
     // set up some empty result arrays
     $growl = array();
     $html = array();
     // loop through each message
     foreach ($flashMessages as $flashKey => $flashMessage) {
         // if we have been asked to show a type and this isnt it then move on
         if (!empty($displayOnlyType) && $displayOnlyType != $flashMessage['type']) {
             continue;
         }
         // allow the templates in options to be populated with anything in the message subarray
         $search = array_keys($flashMessage);
         $search = array_map(create_function('$v', 'return \'{\' . $v . \'}\';'), $search);
         // if we are generating a growl message then do so
         if (!empty($options['growl'])) {
             if ($options['growl'] === TRUE || is_array($options['growl']) && in_array($flashMessage['type'], $options['growl'])) {
                 Event::run('bluebox.message_growl', $flashMessage['text']);
                 $flashMessage['text'] = str_replace('\'', '\\\'', $flashMessage['text']);
                 $growl[] = str_replace($search, $flashMessage, $options['growlTemplate']);
             }
         }
         // if we are generating a html markup then do so
         if (!empty($options['html'])) {
             if ($options['html'] === TRUE || is_array($options['html']) && in_array($flashMessage['type'], $options['html'])) {
                 Event::run('bluebox.message_html', $flashMessage['text']);
                 $flashMessage['text'] = str_replace('"', '\'', $flashMessage['text']);
                 $html[] = str_replace($search, $flashMessage, $options['htmlTemplate']);
             }
         }
         // this message is assumed to have been displayed, remove it
         unset($flashMessages[$flashKey]);
     }
     // save back any messages that did not get displayed to the user
     Session::instance()->set('bluebox_message', $flashMessages);
     // if we are doing this inline then echo it out here and now
     if (!empty($options['inline'])) {
         if (!empty($html)) {
             echo implode(' ', $html);
         }
         if (!empty($growl)) {
             jquery::addPlugin('growl');
             jquery::evalScript(implode(' ', $growl));
         }
     }
     // if the user wants the results then give it to them
     return compact('growl', 'html');
 }
Exemple #24
0
    <?php 
echo form::close_section();
?>

    <?php 
if (isset($views)) {
    echo subview::render($views);
}
?>

    <?php 
if (users::getAttr('user_type') == User::TYPE_SYSTEM_ADMIN) {
    ?>

        <?php 
    jquery::addPlugin('spinner');
    ?>
    
        <?php 
    echo form::open_section('Debug');
    ?>

            <div class="field">
            <?php 
    echo form::label('user[debug_level]', 'UI Level:');
    echo form::input('user[debug_level]');
    javascript::codeBlock('$("#user_debug_level").spinner({max: 4, min: 0});');
    ?>
            </div>

        <?php 
Exemple #25
0
                            <?php echo new view('numbermanager/avaliableNumber.mus', $avaliable['Number']); ?>

                        <?php endforeach; ?>

                    </ul>

            </div>

        </div>

</div>

<?php echo form::close_section(); ?>

<?php jquery::addPlugin(array('tabs', 'scrollTo')); ?>

<?php javascript::add('mustache'); ?>

<?php javascript::codeBlock(NULL, array('scriptname' => 'listNumbers')); ?>

    var avaliableNumberTemplate = <?php echo $avaliableNumberTemplate; ?>;

    var assignedNumberTemplate = <?php echo $assignedNumberTemplate; ?>;

    function unassignNumberClickHandler(ev) {

        ev.preventDefault();

        panelId = '#' + $(this).parents('.assign_number_tab').attr('id');
Exemple #26
0
                        <?php 
    echo form::label('pdnsrecord[' . $iteration . '][content]', 'Content:');
    ?>
                        <?php 
    echo form::input(array('name' => 'pdnsrecord[' . $iteration . '][content]', 'class' => 'pdnsrecord_content'), $record['content']);
    ?>
                    </div>

                </div>

            <?php 
}
?>
            
            <?php 
jquery::addQuery('#powerdns_table .remove_record')->click('function (e) { $(this).parent().slideUp(\'500\', function () { $(this).remove() });}');
?>

        </div>

        <div class="new_record_container">
            <?php 
echo '<a href="' . url::current() . '" id="new_record" class="nxt_aval_link"><span>New DNS Record</span></a>';
?>
        </div>

        <div id="record_template" class="record hide">
            <div class="field record_name">
                <?php 
echo form::label('pdnsrecord_name', 'Record:');
?>
Exemple #27
0
    <?php 
echo form::close_section();
?>

<?php 
// If the jquery exists use it to make it more interactive
if (class_exists('jquery')) {
    jquery::addQuery('#dbType')->change('function () {
                if($(this).val().indexOf(\'sqlite\') == -1)
                {
                    $(\'.dbCredentials\').show();
                    $(\'#dbHostName\').show();
                    $(\'#dbPathName\').hide();
                    $(\'#label_dbHostName\').text(\'' . __('Database Host:') . '\');
                    if($(this).val().indexOf(\'mysql\') == -1)
                    {
                        $(\'#dbPortSelection\').val(\'5432\');
                    } else {
                        $(\'#dbPortSelection\').val(\'3306\');
                    }
                } else {
                    $(\'.dbCredentials\').hide();
                    $(\'#dbHostName\').hide();
                    $(\'#dbPathName\').show();
                    $(\'#label_dbHostName\').text(\'' . __('Database Path:') . '\');
                }
            }
        ');
    jquery::addQuery('#dbType')->trigger('change');
}
Exemple #28
0
 /**
  * This function buils the HTML for a grid, you can choose to render the paging/nav bar
  * and supply any additional HTML attributes for either the table of the nav div in a array
  * such that the array looks like:
  *
  * array(
  * 	'table' => array ('id' => 'someID', 'class'=> 'gridTable', 'extra' => 'onclick="alert('test');"),
  * 	'div' => array ('style' => 'text-align: center;')
  * )
  *
  * @return string grid HTML
  * @param bool $createNavGrid[optional]
  * @param array $attributes[optional]
  */
 public function render($createNavGrid = true, $attributes = array())
 {
     /**
      *
      * THIS SECTION GENERATES HTML FOR A TABLE
      *
      */
     $html = '<div id="' . $this->gridName . 'AjaxMessageReceiver" style="display:none;">&nbsp;</div>';
     // If the user has not supplied an id then we will gen one for the table
     if (empty($attributes['table']['id'])) {
         $attributes['table']['id'] = $this->gridName;
     }
     // We need to add a default class to the table
     $attributes['table']['class'] = empty($attributes['table']['class']) ? 'scroll jqgrid_instance' : $attributes['table']['class'] . ' scroll jqgrid_instance';
     // This gets any extra attributes and unsets it so the form helper will not parse it
     if (!empty($attributes['table']['extra'])) {
         $extra = $attributes['table']['extra'];
         unset($attributes['table']['extra']);
     } else {
         $extra = '';
     }
     // Build the HTML for the table
     $html .= '<table' . form::attributes($attributes['table']) . ' ' . $extra . '><tr><td></td></tr></table>' . "\n";
     /**
      *
      * THIS SECTION GENERATES HTML FOR A NAVIGATION DIV
      *
      */
     $customNavButtons = array();
     $navGrid = array('options' => array(), 'edit' => array(), 'add' => array(), 'del' => array(), 'search' => array(), 'view' => array());
     if ($createNavGrid) {
         // If the user has not supplied an id then we will gen one for the div
         if (empty($attributes['div']['id'])) {
             $attributes['div']['id'] = 'pager_' . $attributes['table']['id'];
         }
         // We need to add a default class to the div
         $attributes['div']['class'] = empty($attributes['div']['class']) ? 'scroll' : $attributes['div']['class'] . ' scroll';
         // This gets any extra attributes and unsets it so the form helper will not parse it
         if (!empty($attributes['div']['extra'])) {
             $extra = $attributes['div']['extra'];
             unset($attributes['div']['extra']);
         } else {
             $extra = '';
         }
         // Build the HTML for the div
         $html .= '<div' . form::attributes($attributes['div']) . ' ' . $extra . '></div>' . "\n";
         // Add the pager div ID to the grid parameters
         $this->jquery['pager'] = '#' . $attributes['div']['id'];
         // build the array of navGrid options, setting defaults as we go
         if (isset($this->jquery['navGrid'])) {
             $this->jquery['navGrid'] += $navGrid;
             $navGrid = $this->jquery['navGrid'];
             unset($this->jquery['navGrid']);
         }
         $navOptions = array('edit' => false, 'add' => false, 'del' => false, 'search' => true, 'view' => false);
         $navGrid['options'] = arr::merge($navOptions, $navGrid['options']);
         // build an array of navButtons
         if (!empty($this->jquery['navButton'])) {
             $customNavButtons = $this->jquery['navButton'];
             unset($this->jquery['navButton']);
         }
     }
     /**
      *
      * THIS SECTION GENERATES JS
      *
      */
     self::_orderColumns();
     $this->jquery['colNames'] = array_values($this->query['columns']);
     if (!empty($this->query['actions'])) {
         // Add this column name to the jqgrid colName headers
         $this->jquery['colNames'][] = '<div style="text-align:center;">' . __('Actions') . '</div>';
         // A convience wraper for adding a colModel to jqgrid
         $colModel =& $this->jquery['colModel'][];
         // Accept any custom parameters for the action column
         if (!empty($this->query['actionsColumn'])) {
             $colModel = $this->query['actionsColumn'];
         }
         // Add a set of non-overridable defaults and save it as the column model
         $colModel['name'] = 'actions';
         $colModel['search'] = false;
         $colModel['sortable'] = false;
         $colModel['align'] = 'center';
     }
     jquery::addPlugin('betagrid');
     $jqueryGrid = jquery::addQuery('#' . $attributes['table']['id'])->jqGrid($this->jquery);
     // This has to come after the jquery helper but the above if block for $createNavGrid must come before
     if ($createNavGrid) {
         $jqueryNavGrid = $jqueryGrid->navGrid('#' . $attributes['div']['id'], $navGrid['options'], $navGrid['edit'], $navGrid['add'], $navGrid['del'], $navGrid['search']);
         if (!empty($customNavButtons)) {
             foreach ($customNavButtons as $customNavButton) {
                 // Replace the keywords with values
                 $clickFunc =& $customNavButton['onClickButton'];
                 if (!empty($clickFunc)) {
                     $clickFunc = str_replace(array('{table_id}', '{pager_id}'), array($attributes['table']['id'], $attributes['div']['id']), $clickFunc);
                 }
                 // Build the JS for a new navButton
                 $jqueryNavGrid->navButtonAdd('#' . $attributes['div']['id'], $customNavButton);
             }
         }
     }
     // Return the html string
     return $html;
 }
Exemple #29
0
	    </div>

	    <div class="field">
		    <?php 
echo form::label('activefeaturecode[exten]', 'Destination: ');
?>
		    <?php 
if (isset($activefeaturecode['exten'])) {
    $selectedClass = numbering::getAssignedPoolByNumber($activefeaturecode['exten']);
} else {
    $selectedClass = NULL;
}
echo numbering::poolsDropdown(array('name' => 'activefeaturecode_class_type', 'forDependent' => TRUE), $selectedClass);
echo " named ";
echo numbering::numbersDropdown(array('id' => 'activefeaturecode_inbound', 'name' => 'activefeaturecode[exten]', 'useNames' => TRUE, 'optGroups' => FALSE, 'forDependent' => TRUE), isset($activefeaturecode['exten']) ? $activefeaturecode['exten'] : NULL);
jquery::addQuery('#activefeaturecode_inbound')->dependent('{ parent: \'activefeaturecode_class_type\', group: \'common_class\' }');
?>
	    </div>

	    <div class="field">
	    <?php 
echo form::label('activefeaturecode[leg]', 'Allow feature code from: ');
echo form::dropdown('activefeaturecode[leg]', array('b' => 'Callee', 'a' => 'Caller'));
?>
	    </div>
    </div>

    <script type="text/javascript">
    	$(function() {

		<?php 
Exemple #30
0
foreach ($queue_status_fields as $fieldname => $label) {
    echo '<input type="radio" name="queue_order" id="queue_order_' . $fieldname . '" value="' . $fieldname . ($fieldname == 'base_score' ? '" checked' : '"') . '/>' . $label . '<br>';
}
?>
                </div>
        </div>
        <div class="clear"></div>
</div>
<div id="update_button" name="update_button"><button id="update" name="update" value="update" class="update small_green_button button" onClick="getQueueStatus(); return false;">Update Calls</button></div>
</form>
<div class="clear"></div>
<div id="queue_list_table" class="queue_list_table"></div>
<div class="clear"></div>

<?php 
jquery::addPlugin(array('growl', 'blockUI'));
?>
<script language="javascript">
    function getQueueStatus() {
        $('#queue_list_status').html('<img src="<?php 
echo url::base() . skins::getSkin();
?>
assets/img/thinking.gif">');
        $.post("<?php 
echo url::base();
?>
index.php/callcenter_supervisor/getQueueList", $('#queueoptionform').serialize(), function(data) {$('#queue_list_table').html(data);$('#queue_list_status').html('');});
    }

    function getAgentStatus() {
        $('#agent_list_status').html('<img src="<?php