/* --------------------------------------------------------------
StyleEdit v2.0
Gambio GmbH
http://www.gambio.de
Copyright (c) 2010 Gambio GmbH
--------------------------------------------------------------
*/
function GMBoxesPageMenu()
{
/*
* @var object
*/
var v_coo_this = this;
/*
* @var string container of the page menu
*/
var v_page_menu_container = 'body';
/*
* @var string containing id of the page menu
*/
var v_page_menu_box_id = '#se_boxes_page_menu';
/*
* @var string containing id of the close button
*/
var v_page_menu_box_close_id = '#se_boxes_page_menu_close';
/*
* function to laod the page menu
* @param object p_element
* @return void
*/
this.load_page_menu = function(p_element)
{
var t_box_name = $(p_element).closest('.gm_box_container').find('div[id^="menubox_"]:first').attr('class');
var t_page_menu = this.http_request(
'StyleEdit/style_edit_request.php?module=boxes_edit&act=get_page_menu&token='+style_edit_sectoken,
'current_template=' + style_edit_config_CURRENT_TEMPLATE + '&box_name='+t_box_name,
'html',
'POST'
);
$(v_page_menu_box_id).remove();
$(v_page_menu_container).append(t_page_menu);
$(v_page_menu_box_id).css(
{
position: 'absolute',
top: $(p_element).offset().top + 'px',
left: 10 + $(p_element).offset().left + $(p_element).outerWidth() + 'px'
}
);
if($('#se_boxes_area_all').attr('checked') === true)
{
$(v_page_menu_box_id + ' input[type="checkbox"]').attr('checked', true);
}
/*
* handle actions in the page menu
*/
this.page_menu_handler(t_box_name);
}
/*
* function to close the page menu
* @param string p_box_name
* @return void
*/
this.page_menu_handler = function(p_box_name)
{
/*
* page menu close handler
*/
$(v_page_menu_box_close_id).click(
function()
{
$(v_page_menu_box_id).remove();
}
);
/*
* page menu checkbox handler
*/
$(v_page_menu_box_id + ' input[type="checkbox"]').click(
function()
{
var t_id = $(this).attr('id').replace('se_boxes_area_', '');
var t_page_active = $(this).attr('checked');
if(t_id == 'all' && t_page_active === true)
{
$(v_page_menu_box_id + ' input[type="checkbox"]').attr('checked', true);
}
else if(t_id == 'all' && t_page_active === false)
{
$(v_page_menu_box_id + ' input[type="checkbox"]').attr('checked', false);
}
if(t_id != 'all')
{
$('#se_boxes_area_all').attr('checked', false);
}
var t_page_menu = v_coo_this.http_request(
'StyleEdit/style_edit_request.php?module=boxes_edit&act=update_page_menu&token='+style_edit_sectoken,
'current_template=' + style_edit_config_CURRENT_TEMPLATE + '&box_name='+p_box_name + '&page_id=' + t_id + '&page_active=' + t_page_active,
'html',
'POST'
);
}
);
return;
}
/*
* function to perform a http request
* @param string p_url
* @param string p_param
* @param string p_data_type
* @param string p_request_type
* @return object
*/
this.http_request = function(p_url, p_param, p_data_type, p_request_type)
{
var t_data = new Object;
jQuery.ajax(
{
data: p_param,
url: p_url,
dataType: p_data_type,
type: p_request_type,
async: false,
success: function(p_data)
{
t_data = p_data;
}
}
);
return t_data;
}
}| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| jquery/ | 2013-11-12 21:10 | 252.22 KB | 76129f60960:kunden | dxwrx-rx-r | |
| GMBoxesMaster.js | 2013-11-12 21:10 | 7.16 KB | 76129f60960:kunden | -xw-x----- | |
| GMBoxesPageMenu.js | 2013-11-12 21:10 | 3.45 KB | 76129f60960:kunden | -xw-x----- | |
| GMColorizer.js | 2013-11-12 21:10 | 13.71 KB | 76129f60960:kunden | -xw-x----- | |
| GMStyleEditControl.js | 2013-11-12 21:10 | 13.56 KB | 76129f60960:kunden | -xw-x----- | |
| GMStyleEditHandler.js | 2013-11-12 21:10 | 45.01 KB | 76129f60960:kunden | -xw-x----- | |
| GMStyleEditSelector.js | 2013-11-12 21:10 | 5.71 KB | 76129f60960:kunden | -xw-x----- | |
| GMStyleEditToolBox.js | 2013-11-12 21:10 | 10.59 KB | 76129f60960:kunden | -xw-x----- | |
| GMStyleMonitor.js | 2013-11-12 21:10 | 3.59 KB | 76129f60960:kunden | -xw-x----- | |
| GMUploader.js | 2013-11-12 21:10 | 12.38 KB | 76129f60960:kunden | -xw-x----- | |
| style_edit.js.php | 2013-11-12 21:10 | 1.44 KB | 76129f60960:kunden | -xw-x----- | |