Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Jul 23, 10:26 PM

in-portal

Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl (revision 7071)
@@ -1,54 +1,52 @@
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_banlist" title="!la_title_NoPermissions!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="adm" title_preset="no_permissions" module="in-portal" icon="icon46_banlist"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
-
+
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Back" escape="1"/>',
function() {
if (window.opener != null) {
window.close();
}
else {
history.back();
}
} ) );
-
+
a_toolbar.Render();
</script>
-
+
</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td height="400" valign="middle" align="left">
<center><b>No Permission</b></center><br />
<inp2:m_if check="m_IsDebugMode">
<inp2:m_if check="m_GetEquals" name="from_template" value="1">
Permissions Checked: <b><inp2:m_get name="perms"/></b><br />
Template: <b><inp2:m_get name="next_template"/></b><br />
Redirect From Tag: <b>yes</b><br />
<inp2:m_else/>
Section: <b><inp2:m_get name="section"/></b><br />
Event: <b><inp2:m_get name="main_prefix"/>:<inp2:m_get name="event_name"/></b><br />
Redirect From Tag: <b>no</b><br />
</inp2:m_if></b><br />
</inp2:m_if>
- </td>
+ </td>
</tr>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/popups/column_picker.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/popups/column_picker.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/popups/column_picker.tpl (revision 7071)
@@ -1,89 +1,91 @@
<inp2:adm_SetPopupSize width="600" height="500"/>
<inp2:m_RequireLogin/>
-<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
-<inp2:m_ParseBlock name="kernel_form"/>
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="blue_bar" prefix="adm" title_preset="column_picker" module="in-portal"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
set_hidden_field('picked_str',select_to_string('picked_columns'))
set_hidden_field('hidden_str',select_to_string('available_columns'))
submit_event('adm','OnSaveColumns');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('adm','OnClosePopup');
// window.close();
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
move_options_up('picked_columns', 1)
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
move_options_down('picked_columns', 1)
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr class="table_color2">
+<table width="100%" border="0" cellspacing="0" cellpadding="4" >
+ <tr class="">
<td>
- <table>
+ <table style="width: 500px; margin: 5px auto;" >
+ <tr>
+ <td>
+ <strong><inp2:m_phrase label="la_PickedColumns"/></strong>
+ </td>
+ <td>&nbsp;</td>
+ <td>
+ <strong><inp2:m_phrase label="la_AvailableColumns"/></strong>
+ </td>
+ </tr>
<tr>
- <td style="text-align: center">
- <inp2:m_DefineElement name="shipping_type">
+ <td style="text-align: left">
+ <inp2:m_DefineElement name="a_column">
<option value="<inp2:m_param name="_Id"/>"><inp2:m_param name="_Name"/></option>
</inp2:m_DefineElement>
- <inp2:m_phrase label="la_PickedColumns"/>
- <select id="picked_columns" multiple="multiple" size="20" style="width: 200px">
- <inp2:adm_PrintColumns render_as="shipping_type"/>
+ <select id="picked_columns" multiple="multiple" size="20" style="width: 230px">
+ <inp2:adm_PrintColumns render_as="a_column"/>
</select>
<br/><br/>
</td>
- <td style="text-align: center">
- <input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_columns', 'picked_columns'); select_sort('picked_columns')" class="button"><br>
- <img src="img/s.gif" width="1" height="4" alt=""><br>
- <input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('picked_columns', 'available_columns'); select_sort('available_columns');" class="button">
+ <td style="text-align: center; width: 40px;">
+ <img style="cursor: pointer; border: 0px" src="img/icons/icon_left.gif" onclick="move_selected('available_columns', 'picked_columns');"/><br/>
+ <img style="cursor: pointer; border: 0px" src="img/icons/icon_right.gif" onclick="move_selected('picked_columns', 'available_columns'); select_sort('available_columns');"/><br/>
</td>
- <td style="text-align: center">
- <inp2:m_phrase label="la_AvailableColumns"/>
-
- <select id="available_columns" multiple="multiple" size="20" style="width: 200px">
- <inp2:adm_PrintColumns hidden="1" render_as="shipping_type"/>
+ <td style="text-align: left">
+ <select id="available_columns" multiple="multiple" size="20" style="width: 230px">
+ <inp2:adm_PrintColumns hidden="1" render_as="a_column"/>
</select>
<br/><br/>
</td>
</tr>
</table>
</td>
<td>&nbsp;</td>
</tr>
</table>
<input type="hidden" name="main_prefix" value="<inp2:m_get var="main_prefix"/>"/>
</form>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/popups/column_picker.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.5
\ No newline at end of property
+1.1.2.6
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/header.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/header.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/header.tpl (revision 7071)
@@ -1,52 +1,53 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>In-Portal :: Administration Panel</title>
<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>">
<meta name="keywords" content="...">
<meta name="description" content="...">
<meta name="robots" content="all">
<meta name="copyright" content="Copyright &#174; 2006 Test, Inc">
<meta name="author" content="Intechnic Inc.">
<inp2:m_base_ref/>
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" rev="stylesheet" href="incs/style.css" type="text/css" />
<script language="javascript" src="js/is.js"></script>
<script language="javascript" src="js/ajax.js"></script>
<script language="javascript" src="js/script.js"></script>
<script language="javascript" src="js/in-portal.js"></script>
<script language="javascript" src="js/toolbar.js"></script>
<script language="javascript" src="js/grid.js"></script>
<script language="javascript">
var t = '<inp2:m_get param="t"/>';
var popups = '1';
var multiple_windows = '1';
var main_title = '<inp2:m_GetConfig var="Site_Name" escape="1"/>';
var tpl_changed = 0;
var base_url = '<inp2:m_BaseURL/>';
var $base_path = '<inp2:m_GetConst name="BASE_PATH"/>';
var img_path = '<inp2:m_TemplatesBase module="#MODULE#"/>/img/';
<inp2:m_if check="m_GetEquals" name="m_wid" value="" inverse="inverse">
window.name += '_<inp2:m_get name="m_wid"/>';
</inp2:m_if>
var $use_popups = <inp2:m_if check="adm_UsePopups">true<inp2:m_else/>false</inp2:m_if>;
+var $use_toolbarlabels = <inp2:m_if check="adm_UseToolbarLabels">true<inp2:m_else/>false</inp2:m_if>;
</script>
</head>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_if check="m_ParamEquals" name="nobody" value="yes" inverse="inverse">
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" <inp2:m_get param="body_properties"/>>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="noform" value="yes" inverse="inverse">
<inp2:m_ParseBlock name="kernel_form"/>
</inp2:m_if>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/header.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/footer.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/footer.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/footer.tpl (revision 7071)
@@ -1,16 +1,41 @@
-<inp2:m_if check="adm_UsePopups" inverse="inverse">
+<inp2:m_if check="adm_UsePopups">
+ <script type="text/javascript">
+ document.body.style.overflow = 'hidden';
+ document.body.style.height = '100%';
+ document.body.scroll = 'no'
+ var o = '';
+ var el = document.getElementById('scroll_container');
+ if (el) {
+ o += '<div style="position: relative; overflow: auto; width: 100%; height: 100%;">';
+ o += el.innerHTML + '</div>';
+ el.innerHTML = o;
+ AdjustScollableArea();
+ addEvent(window, 'resize', AdjustScollableArea)
+ }
+
+ function AdjustScollableArea()
+ {
+ var el = document.getElementById('scroll_container');
+ var h = (document.all ? window.document.body.offsetHeight : window.innerHeight) - el.offsetTop + 'px';
+ var w = (document.all ? window.document.body.offsetWidth : window.innerWidth) - el.offsetLeft + 'px';
+// alert('h: '+h)
+ el.style.height = h;
+// el.style.width=w;
+ }
+ </script>
+<inp2:m_else/>
<inp2:m_if check="adm_TemplateMatches" templates="head,tree" inverse="inverse">
<br /><br />
</inp2:m_if>
</inp2:m_if>
<inp2:adm_AfterScript/>
<inp2:m_if check="m_ParamEquals" name="noform" value="yes" inverse="inverse">
<inp2:m_ParseBlock name="kernel_form_end"/>
</inp2:m_if>
<div id="nlsMenuPlace"></div>
</body>
</html>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/footer.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl (revision 7071)
@@ -1,71 +1,69 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_Regional!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('lang', 'regional/languages_edit');
}
-
+
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_language', '<inp2:m_phrase label="la_ToolTip_NewLanguage" escape="1"/>',
function() {
std_precreate_item('lang', 'regional/languages_edit')
} ) );
-
+
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('lang')
} ) );
-
-
+
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('primary_language', '<inp2:m_phrase label="la_ToolTip_SetPrimaryLanguage" escape="1"/>', function() {
submit_event('lang','OnSetPrimary');
}
) );
-
-
+
+
a_toolbar.AddButton( new ToolBarButton('import_language', '<inp2:m_phrase label="la_ToolTip_ImportLanguage" escape="1"/>', function() {
- redirect('<inp2:m_t t="regional/languages_import" phrases.import_event="OnNew" m_opener="d" pass="all,m,phrases.import" />');
+ redirect('<inp2:m_t t="regional/languages_import" phrases.import_event="OnNew" m_opener="d" pass="all,m,phrases.import" />');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('export_language', '<inp2:m_phrase label="la_ToolTip_ExportLanguage" escape="1"/>', function() {
submit_event('lang','OnExportLanguage');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
+
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
-
+
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="lang" IdField="LanguageId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['lang'].SetDependantToolbarButtons( new Array('edit','delete','primary_language','export_language') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/email_messages_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/email_messages_edit.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/email_messages_edit.tpl (revision 7071)
@@ -1,49 +1,46 @@
<inp2:adm_SetPopupSize width="827" height="400"/>
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_Regional!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="email_messages_edit" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('emailmessages','<inp2:m_if prefix="emailmessages" function="PropertyEquals" property="ID" value="0"/>OnCreate<inp2:m_else/>OnUpdate<inp2:m_endif/>');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('emailmessages','OnCancel');
}
) );
-
+
a_toolbar.Render();
-
+
</script>
</td>
</tr>
</tbody>
</table>
<inp2:lang_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="emailmessages" field="LanguageId"/>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="emailmessages" field="EventId"/>
<!-- <inp2:m_ParseBlock name="inp_label" prefix="emailmessages" field="Type" title="!la_fld_EventType!"/> -->
<inp2:m_ParseBlock name="inp_edit_box" prefix="emailmessages" field="Subject" title="!la_fld_Subject!" size="60"/>
<inp2:m_ParseBlock name="inp_edit_radio" prefix="emailmessages" field="MessageType" title="!la_fld_MessageType!"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" rows="5" cols="60"/>
- <inp2:m_ParseBlock name="subsection" title="!la_section_Message!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_Message!"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="emailmessages" field="Body" title="!la_fld_MessageBody!" rows="20" cols="85"/>
-</table>
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/email_messages_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_tabs.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_tabs.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_tabs.tpl (revision 7071)
@@ -1,13 +1,13 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<table style="padding: 2px 0px 0px 0px; margin: 0px; border: none; border-collapse: collapse" width="100%">
<tr>
<td align="right" width="100%">
<table cellpadding="0" cellspacing="0" border="0" height="23">
<tr>
<inp2:m_ParseBlock name="tab" title="la_tab_General" t="regional/languages_edit" main_prefix="lang"/>
<inp2:m_ParseBlock name="tab" title="la_tab_Labels" t="regional/languages_edit_phrases" main_prefix="lang"/>
<inp2:m_ParseBlock name="tab" title="la_tab_EmailEvents" t="regional/languages_edit_email_events" main_prefix="lang"/>
</tr>
</table>
</td>
</tr>
</table>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.1.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export_step2.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export_step2.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export_step2.tpl (revision 7071)
@@ -1,34 +1,31 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_ExportLanguagePack!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language_results" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+
-
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td>
<inp2:m_phrase label="la_DownloadLanguageExport"/>
<td>
<a href="<inp2:lang_ExportPath as_url="1"/><inp2:m_get name="export_file"/>"><inp2:lang_ExportPath/><inp2:m_get name="export_file"/></a>
</td>
<td class="error">&nbsp;</td>
</tr>
-
+
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td colspan="3" align="left">
<a href="javascript:submit_event('lang','OnGoBack');"><inp2:m_phrase label="la_Continue"/></a>
</td>
</tr>
-
-
-</table>
+
+
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export_step2.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_email_events.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_email_events.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_email_events.tpl (revision 7071)
@@ -1,79 +1,77 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_RegionalSettings!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="events_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
-
+
function edit()
{
std_edit_temp_item('phrases', 'regional/email_messages_edit');
}
-
+
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
+
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
-
- a_toolbar.AddButton( new ToolBarSeparator('sep3') );
-
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
-
+
a_toolbar.Render();
-
+
<inp2:m_if prefix="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
- <inp2:m_else/>
+ <inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="emailevents" IdField="EventId" grid="Default" menu_filters="yes" main_prefix="lang"/>
<script type="text/javascript">
Grids['emailevents'].SetDependantToolbarButtons( new Array('edit') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_email_events.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export.tpl (revision 7071)
@@ -1,49 +1,47 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_ExportLanguagePack!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="export_language" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','OnExportProgress');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang', 'OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_ParseBlock name="inp_edit_field_caption" prefix="phrases.export" field="LangFile" title="la_fld_ExportFileName"/>
<td>
<inp2:lang_ExportPath/> <input type="text" name="<inp2:phrases.export_InputName field="LangFile"/>" id="<inp2:phrases.export_InputName field="LangFile"/>" value="<inp2:phrases.export_Field field="LangFile"/>" />
</td>
<td class="error"><inp2:phrases.export_Error field="LangFile"/>&nbsp;</td>
</tr>
<inp2:m_ParseBlock name="inp_edit_checkboxes" use_phrases="1" prefix="phrases.export" field="PhraseType" title="!la_fld_ExportPhraseTypes!"/>
<inp2:m_ParseBlock name="inp_edit_checkboxes" no_empty="no_empty" prefix="phrases.export" field="Module" title="!la_fld_ExportModules!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="phrases.export" field="DoNotEncode" title="!la_fld_DoNotEncode!"/>
</table>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_export.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/phrases_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/phrases_edit.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/phrases_edit.tpl (revision 7071)
@@ -1,57 +1,55 @@
<inp2:adm_SetPopupSize width="888" height="415"/>
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_RegionalSettings!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="phrases" title_preset="phrase_edit" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('phrases','<inp2:phrases_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('phrases','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:phrases_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<input type="hidden" id="phrases_label" name="phrases_label" value="<inp2:m_get name="phrases_label"/>">
<inp2:m_DefineElement name="phrase_element">
<tr class="subsectiontitle">
<td colspan="3"><inp2:phrases_Field name="Phrase"/></td>
</tr>
<inp2:m_ParseBlock name="inp_edit_hidden" prefix="phrases" field="LanguageId"/>
<inp2:m_ParseBlock name="inp_label" prefix="phrases" field="PrimaryTranslation" title="!la_fld_PrimaryTranslation!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="phrases" field="Phrase" title="!la_fld_Phrase!" size="60"/>
<inp2:m_ParseBlock name="inp_edit_textarea" prefix="phrases" field="Translation" title="!la_fld_Translation!" rows="7" cols="50" allow_html="0"/>
<inp2:m_ParseBlock name="inp_edit_radio" prefix="phrases" field="PhraseType" title="!la_fld_PhraseType!"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="phrases" field="Module" title="!la_fld_Module!"/>
</inp2:m_DefineElement>
<inp2:m_if check="m_GetEquals" name="phrases_label" value="ALEX, FIX IT!">
<inp2:phrases_MultipleEditing render_as="phrase_element"/>
<inp2:m_else/>
<inp2:m_RenderElement name="phrase_element"/>
</inp2:m_if>
</table>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/phrases_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit.tpl (revision 7071)
@@ -1,102 +1,100 @@
<inp2:adm_SetPopupSize width="850" height="600"/>
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_LanguagePacks!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="languages_edit_general" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
-
-
-
+
+
+
a_toolbar.Render();
-
+
<inp2:m_if prefix="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
- <inp2:m_else/>
+ <inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:lang_SaveWarning name="grid_save_warning"/>
+<div id="scroll_container">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_id_label" prefix="lang" field="LanguageId" title="!la_fld_LanguageId!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="PackName" title="!la_fld_PackName!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="LocalName" title="!la_fld_LocalName!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="Charset" title="!la_fld_Charset!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="IconURL" title="!la_fld_IconURL!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="DateFormat" title="!la_fld_DateFormat!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="TimeFormat" title="!la_fld_TimeFormat!"/>
-
+
<inp2:m_ParseBlock name="inp_edit_options" prefix="lang" field="InputDateFormat" title="!la_fld_InputDateFormat!"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="lang" field="InputTimeFormat" title="!la_fld_InputTimeFormat!"/>
-
+
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="DecimalPoint" title="!la_fld_DecimalPoint!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="lang" field="ThousandSep" title="!la_fld_ThousandSep!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="lang" field="PrimaryLang" title="!la_fld_PrimaryLang!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="lang" field="Enabled" title="!la_fld_Enabled!"/>
<inp2:m_ParseBlock name="inp_edit_options" prefix="lang" field="UnitSystem" title="!la_fld_UnitSystem!" use_phrases="1"/>
<inp2:m_if check="lang_IsNewMode">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text">
<inp2:m_phrase name="la_fld_CopyLabels"/>:
</td>
<td>
<input type="hidden" id="<inp2:lang_InputName field="CopyLabels"/>" name="<inp2:lang_InputName field="CopyLabels"/>" value="<inp2:lang_Field field="CopyLabels" db="db"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_CopyLabels" name="_cb_CopyLabels" <inp2:lang_Field field="CopyLabels" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:lang_InputName field="CopyLabels"/>'))">
<inp2:m_inc param="tab_index" by="1"/>
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lang_InputName field="CopyFromLanguage"/>" id="<inp2:lang_InputName field="CopyFromLanguage"/>">
<option value="0">--<inp2:m_phrase name="la_prompt_Select_Source"/></option>
<inp2:lang_PredefinedOptions field="CopyFromLanguage" block="inp_option_item" selected="selected"/>
</select>
</td>
<td class="error">&nbsp;</td>
</tr>
</inp2:m_if>
-</table>
-
+</table>
+</div>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import_step2.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import_step2.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import_step2.tpl (revision 7071)
@@ -1,29 +1,26 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_ImportLanguagePack!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language_step2" module="in-portal" icon="icon46_conf_regional"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="$title"/>
-
+ <inp2:m_ParseBlock name="subsection" title="$title"/>
+
<tr>
<td align="middle">
<br />
<table class="tableborder_full" width="75%">
<tr border="1">
<td width="<inp2:m_param name="percent_done"/>%" class="progress_bar">&nbsp;</td>
<td bgcolor=#FFFFFF width="<inp2:m_param name="percent_left"/>%"></td>
</tr>
</table>
<br />
<input type="submit" class="button" value="<inp2:m_phrase label="la_Cancel"/>" name="events[lang][OnImportCancel]" />
</TD>
</TR>
-
-</table>
+
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import_step2.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl (revision 7071)
@@ -1,106 +1,104 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_RegionalSettings!"/>
<inp2:m_include t="regional/languages_edit_tabs"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" phrases[grid]="Default" pagination="0" title_preset="phrases_list" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('phrases', 'regional/phrases_edit');
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_language_var', '<inp2:m_phrase label="la_ToolTip_NewLabel" escape="1"/>',
function() {
std_new_item('phrases', 'regional/phrases_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('phrases')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if prefix="lang" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if prefix="lang" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="lang" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
<td style="text-align: right" align="right">
- <script type="text/javascript">
- b_toolbar = new ToolBar();
- b_toolbar.ButtonStyle = 'float: right;'
-
- b_toolbar.AddButton( new ToolBarButton('search', '<inp2:m_phrase label="la_ToolTip_Search" escape="1"/>',
- function() {
- search('phrases', 'Default', 0);
- } ) );
-
- b_toolbar.AddButton( new ToolBarButton('search_reset', '<inp2:m_phrase label="la_ToolTip_SearchReset" escape="1"/>',
- function() {
- search_reset('phrases', 'Default', 0);
- } ) );
-
- b_toolbar.Render();
- </script>
- </td>
+ <script type="text/javascript">
+ b_toolbar = new ToolBar();
+ b_toolbar.ButtonStyle = 'float: right;'
+
+ b_toolbar.AddButton( new ToolBarButton('search', '<inp2:m_phrase label="la_ToolTip_Search" escape="1"/>',
+ function() {
+ search('phrases', 'Default', 0);
+ } ) );
+
+ b_toolbar.AddButton( new ToolBarButton('search_reset', '<inp2:m_phrase label="la_ToolTip_SearchReset" escape="1"/>',
+ function() {
+ search_reset('phrases', 'Default', 0);
+ } ) );
+
+ b_toolbar.Render();
+ </script>
+ </td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="phrases" IdField="PhraseId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['phrases'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import.tpl (revision 7071)
@@ -1,44 +1,41 @@
<inp2:m_RequireLogin permissions="in-portal:configure_lang.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_conf_regional" title="!la_title_ImportLanguagePack!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="lang" title_preset="import_language" module="in-portal" icon="icon46_conf_regional"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','OnImportLanguage');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang', 'OnGoBack');
}
) );
-
+
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_upload" prefix="phrases.import" field="LangFile" title="!la_fld_LanguageFile!"/>
-
+
<inp2:m_ParseBlock name="inp_edit_checkboxes" use_phrases="1" prefix="phrases.import" field="PhraseType" title="!la_fld_InstallPhraseTypes!"/>
<inp2:m_ParseBlock name="inp_edit_checkbox" prefix="phrases.import" field="ImportOverwrite" hint_label="la_importlang_phrasewarning" title="la_prompt_overwritephrases"/>
-
+
<!-- <inp2:m_ParseBlock name="inp_edit_checkboxes" no_empty="no_empty" prefix="phrases.export" field="Module" title="!la_fld_InstallModules!" /> -->
-</table>
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_import.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl (revision 7071)
@@ -1,30 +1,28 @@
<inp2:m_RequireLogin permissions="in-portal:service.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" icon="icon46_modules" title="!la_title_SystemTools!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="adm" title_preset="system_tools" module="in-portal" icon="icon46_modules"/>
<inp2:m_DefineElement name="service_elem">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text" style="width: 300px;">
<inp2:m_phrase label="$title"/>:
</td>
<td valign="top" width="100">
<input class="button" type="submit" name="events[adm][<inp2:m_param name="event_name"/>]" value="Go">
</td>
<td class="error">&nbsp;</td>
</tr>
</inp2:m_DefineElement>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" id="config_table">
<inp2:m_RenderElement name="service_elem" title="la_Service_ResetModRwCache" event_name="OnResetModRwCache"/>
<inp2:m_RenderElement name="service_elem" title="la_Service_ResetCMSMenuCache" event_name="OnResetCMSMenuCache"/>
<inp2:m_RenderElement name="service_elem" title="la_Service_ResetSections" event_name="OnResetSections"/>
<inp2:m_RenderElement name="service_elem" title="la_Service_ConfigCache" event_name="OnResetConfigsCache"/>
<inp2:m_RenderElement name="service_elem" title="la_Service_RebuildThemes" event_name="OnRebuildThemes"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/user_edit_password.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/user_edit_password.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/user_edit_password.tpl (revision 7071)
@@ -1,46 +1,43 @@
<inp2:adm_SetPopupSize width="564" height="377"/>
<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" prefix="u" icon="icon46_users" module="proj-base" title="la_title_UsersManagement"/>
<inp2:m_ParseBlock name="blue_bar" prefix="u" title_preset="admins_edit" module="proj-base" icon="icon46_users"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('u','OnCancelEdit');
}
) );
-
+
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_id_label" prefix="u" field="PortalUserId" title="!la_fld_Id!"/>
<inp2:m_ParseBlock name="inp_label" prefix="u" field="Login" title="la_fld_Username"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="Password" title="la_fld_Password"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="VerifyPassword" title="la_fld_VerifyPassword"/>
<inp2:m_ParseBlock name="inp_label" prefix="u" field="FirstName" title="la_fld_FirstName"/>
<inp2:m_ParseBlock name="inp_label" prefix="u" field="LastName" title="la_fld_LastName"/>
<inp2:m_ParseBlock name="inp_label" prefix="u" field="Email" title="la_fld_Email"/>
-</table>
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/user_edit_password.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (revision 7071)
@@ -1,73 +1,71 @@
<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" prefix="u" icon="icon46_users" module="proj-base" title="la_title_UsersManagement"/>
<inp2:m_ParseBlock name="blue_bar" prefix="u" title_preset="admins_list" icon="icon46_users" module="proj-base"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('u', 'proj-base/users/admins_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('proj-base:new_user', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('u', 'proj-base/users/admins_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('u')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<td style="white-space: nowrap; text-align: right; width: 200px;" align="right">
<div style="float: right">
<script type="text/javascript">
b_toolbar = new ToolBar();
// b_toolbar.ButtonStyle = 'float: right;'
b_toolbar.AddButton( new ToolBarButton('search', '<inp2:m_phrase label="la_ToolTip_Search" escape="1"/>',
function() {
search('u', 'Admins', 0);
} ) );
b_toolbar.AddButton( new ToolBarButton('search_reset', '<inp2:m_phrase label="la_ToolTip_SearchReset" escape="1"/>',
function() {
search_reset('u', 'Admins', 0);
} ) );
b_toolbar.Render();
</script>
</div>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="u" IdField="PortalUserId" grid="Admins" menu_filters="yes" grid_filters="1"/>
<script type="text/javascript">
Grids['u'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/root_edit_password.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/root_edit_password.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/root_edit_password.tpl (revision 7071)
@@ -1,42 +1,40 @@
<inp2:adm_SetPopupSize width="564" height="377"/>
<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
<inp2:m_set u_id="-1"/>
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
<inp2:m_ParseBlock name="section_header" prefix="u" icon="icon46_users" module="proj-base" title="la_title_UsersManagement"/>
<inp2:m_ParseBlock name="blue_bar" prefix="u" title_preset="root_edit" module="proj-base" icon="icon46_users"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('u','OnUpdateRootPassword');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window.close();
}
) );
-
+
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="RootPassword" title="la_fld_Password"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="VerifyRootPassword" title="la_fld_VerifyPassword"/>
-</table>
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/root_edit_password.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl (revision 7071)
@@ -1,72 +1,69 @@
<inp2:adm_SetPopupSize width="564" height="352"/>
<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" prefix="u" icon="icon46_users" module="proj-base" title="la_title_UsersManagement"/>
<inp2:m_ParseBlock name="blue_bar" prefix="u" title_preset="admins_edit" module="proj-base" icon="icon46_users"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('u','OnCancelEdit');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
-
-
-
+
+
+
a_toolbar.Render();
-
+
<inp2:m_if prefix="u" function="IsSingle"/>
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
- <inp2:m_else/>
+ <inp2:m_else/>
<inp2:m_if prefix="u" function="IsLast"/>
a_toolbar.DisableButton('next');
<inp2:m_endif/>
<inp2:m_if prefix="u" function="IsFirst"/>
a_toolbar.DisableButton('prev');
<inp2:m_endif/>
<inp2:m_endif/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
+ <inp2:m_ParseBlock name="subsection" title="!la_section_General!"/>
<inp2:m_ParseBlock name="inp_id_label" prefix="u" field="PortalUserId" title="!la_fld_Id!"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="u" field="Login" title="la_fld_Username"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="Password" title="la_fld_Password"/>
<inp2:m_ParseBlock name="inp_edit_password" prefix="u" field="VerifyPassword" title="la_fld_VerifyPassword"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="u" field="FirstName" title="la_fld_FirstName"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="u" field="LastName" title="la_fld_LastName"/>
<inp2:m_ParseBlock name="inp_edit_box" prefix="u" field="Email" title="la_fld_Email"/>
-</table>
+</table>
<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.5
\ No newline at end of property
+1.1.2.6
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_email.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_email.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_email.tpl (revision 7071)
@@ -1,65 +1,63 @@
<inp2:m_RequireLogin perm_event="emailevents:OnLoad" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" prefix="emailevents.module" icon="icon46_settings_email" title="!la_title_emailevents!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="emailevents.module" title_preset="email_settings_list" icon="icon46_settings_email"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
openSelector('emailevents.module', '<inp2:m_t t="user_selector" pass="all,emailevents.module" escape="1"/>', 'FromUserId', null, 'OnSaveSelected');
}
-
+
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('usertogroup', '<inp2:m_phrase label="la_ToolTip_SelectUser" escape="1"/>', edit
) );
-
-
+
+
//a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Enable" escape="1"/>', function() {
submit_event('emailevents.module','OnMassApprove');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Disable" escape="1"/>', function() {
submit_event('emailevents.module','OnMassDecline');
}
- ) );
-
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('frontend_mail', '<inp2:m_phrase label="la_ToolTip_Email_FrontOnly" escape="1"/>', function() {
submit_event('emailevents.module','OnFrontOnly');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
+
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_ParseBlock name="grid" PrefixSpecial="emailevents.module" IdField="EventId" grid="EmailSettings" menu_filters="yes"/>
<script type="text/javascript">
Grids['emailevents.module'].SetDependantToolbarButtons( new Array('frontend_mail','usertogroup','approve','decline') );
</script>
<input type="hidden" name="emailevents.module_PopupSelectedUser" value="">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_email.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl (revision 7071)
@@ -1,93 +1,91 @@
<inp2:m_RequireLogin perm_event="conf:OnLoad" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
+<inp2:m_include t="incs/header"/>
<inp2:m_ParseBlock name="section_header" prefix="conf" icon="icon46_settings_#section#" title="!la_tab_Config#section#!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="conf" title_preset="config_list_#section#" icon="icon46_settings_#section#"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function ValidatePassFld(fieldId){
var passFld=document.getElementById(fieldId);
var passVerifyFld=document.getElementById('verify_'+fieldId);
if (passFld && passVerifyFld && passFld.value == passVerifyFld.value) {
return true;
}
else {
var passErrorCell=document.getElementById('error_'+fieldId);
if (passErrorCell){
passErrorCell.innerHTML='<inp2:m_phrase name="la_error_PasswordMatch" />';
}
return false;
}
}
-
+
function ValidatePassFields(){
var el=false;
var validated=true;
for (var i=0; i<document.forms.kernel_form.elements.length; i++){
el=document.forms.kernel_form.elements[i];
if (el.getAttribute('primarytype')=='password'){
if (!ValidatePassFld(el.id)){
validated=false;
}
}
}
return validated;
}
-
+
function toggle_section($label) {
var $table = document.getElementById('config_table');
var $row = null;
var $is_visible = false;
-
+
for (var $i = 0; $i < $table.rows.length; $i++) {
$row = $table.rows[$i];
if ($row.getAttribute('header_label') != $label) {
continue;
}
-
+
if (!$row.style.display) {
$row.style.display = document.all ? 'block' : 'table-row';
}
-
+
$is_visible = !($row.style.display == 'none');
$row.style.display = $is_visible ? 'none' : (document.all ? 'block' : 'table-row');
-
+
document.getElementById('toggle_mark['+$label+']').innerHTML = '[' + ($is_visible ? '+' : '-') + ']';
}
}
-
+
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
if (ValidatePassFields()){
submit_event('conf','<inp2:conf_SaveEvent/>');
}
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('conf','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/config_blocks"/>
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" id="config_table">
<inp2:conf_PrintList block="config_block" per_page="-1" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js (revision 7071)
@@ -1,420 +1,452 @@
var $GridManager = new GridManager();
function GridManager () {
this.Grids = Grids; // get all from global variable, in future replace all references to it with $GridManager.Grids
this.AlternativeGrids = new Array();
}
GridManager.prototype.AddAlternativeGrid = function ($source_grid, $destination_grid, $reciprocal)
{
if ($source_grid == $destination_grid) {
return false;
}
if (typeof(this.AlternativeGrids[$source_grid]) == 'undefined') {
// alternative grids not found, create empty list
this.AlternativeGrids[$source_grid] = new Array();
}
if (!in_array($destination_grid, this.AlternativeGrids[$source_grid])) {
// alternative grids found, check if not added already
this.AlternativeGrids[$source_grid].push($destination_grid);
}
if ($reciprocal) {
this.AddAlternativeGrid($destination_grid, $source_grid);
}
}
GridManager.prototype.ClearAlternativeGridsSelection = function ($source_prefix)
{
if (!this.AlternativeGrids[$source_prefix]) return false;
var $i = 0;
var $destination_prefix = '';
while ($i < this.AlternativeGrids[$source_prefix].length) {
$destination_prefix = this.AlternativeGrids[$source_prefix][$i];
if (this.Grids[$destination_prefix]) {
// alternative grid set, but not yet loaded by ajax
this.Grids[$destination_prefix].ClearSelection();
}
$i++;
}
}
GridManager.prototype.CheckDependencies = function ($prefix) {
if (typeof(this.Grids[$prefix]) != 'undefined') {
this.Grids[$prefix].CheckDependencies('GridManager.CheckDependencies');
}
}
function GridItem(grid, an_element, cb, item_id, class_on, class_off)
{
this.Grid = grid;
this.selected = false;
this.id = an_element.id;
this.ItemId = item_id;
this.sequence = parseInt(an_element.getAttribute('sequence'));
this.class_on = class_on;
if (class_off == ':original') {
this.class_off = an_element.className;
}
else
this.class_off = class_off;
this.HTMLelement = an_element;
if (document.getElementById('left_'+an_element.id)) {
this.LeftElement = document.getElementById('left_'+an_element.id);
}
else {
this.LeftElement = false;
}
this.CheckBox = cb;
this.value = this.ItemId;
this.ItemType = 11;
}
GridItem.prototype.Init = function ()
{
this.HTMLelement.GridItem = this;
this.HTMLelement.onclick = function(ev) {
this.GridItem.Click(ev);
};
this.HTMLelement.ondblclick = function(ev) {
this.GridItem.DblClick(ev);
}
if ( this.LeftElement ) {
this.LeftElement.GridItem = this;
this.LeftElement.onclick = function(ev) {
this.GridItem.Click(ev);
};
this.LeftElement.ondblclick = function(ev) {
this.GridItem.DblClick(ev);
}
}
if ( isset(this.CheckBox) ) {
this.CheckBox.GridItem = this;
this.CheckBox.onclick = function(ev) {
this.GridItem.cbClick(ev);
};
this.CheckBox.ondblclick = function(ev) {
this.GridItem.DblClick(ev);
}
}
}
GridItem.prototype.DisableClicking = function ()
{
this.HTMLelement.onclick = function(ev) {
return false;
};
this.HTMLelement.ondblclick = function(ev) {
return false;
}
if ( this.LeftElement ) {
this.LeftElement.onclick = function(ev) {
return false;
};
this.LeftElement.ondblclick = function(ev) {
return false;
}
}
if ( isset(this.CheckBox) ) {
this.CheckBox.onclick = function(ev) {
return false;
};
}
}
GridItem.prototype.Select = function ()
{
if (this.selected) return;
this.selected = true;
this.HTMLelement.className = this.class_on;
if ( this.LeftElement ) {
this.LeftElement.className = this.class_on;
}
if ( isset(this.CheckBox) ) {
this.CheckBox.checked = true;
}
this.Grid.LastSelectedId = this.ItemId;
this.Grid.SelectedCount++;
// this is for in-portal only (used in relation select)
LastCheckedItem = this;
if (typeof (this.Grid.OnSelect) == 'function' ) {
this.Grid.OnSelect(this.ItemId);
}
}
GridItem.prototype.UnSelect = function ( force )
{
if ( !this.selected && !force) return;
this.selected = false;
this.HTMLelement.className = this.class_off;
if ( this.LeftElement ) {
this.LeftElement.className = this.class_off;
}
if ( isset(this.CheckBox) ) {
this.CheckBox.checked = false;
}
this.Grid.SelectedCount--;
if (typeof (this.Grid.OnUnSelect) == 'function' ) {
this.Grid.OnUnSelect(this.ItemId);
}
+ this.Grid.LastSelectedId = null;
}
GridItem.prototype.ClearBrowserSelection = function() {
- if (window.getSelection) {
- // removeAllRanges will be supported by Opera from v 9+, do nothing by now
- var selection = window.getSelection();
- if (selection.removeAllRanges) { // Mozilla & Opera 9+
- window.getSelection().removeAllRanges();
- }
- } else if (document.selection && !is.opera) { // IE
- document.selection.empty();
- }
+ ClearBrowserSelection();
}
GridItem.prototype.Click = function (ev)
{
this.ClearBrowserSelection();
this.Grid.ClearAlternativeGridsSelection('GridItem.Click');
var e = !is.ie ? ev : window.event;
+
if (e.shiftKey && !this.Grid.RadioMode) {
this.Grid.SelectRangeUpTo(this.sequence);
}
else {
if (e.ctrlKey && !this.Grid.RadioMode) {
this.Toggle()
}
else {
if (!(this.Grid.RadioMode && this.Grid.LastSelectedId == this.ItemId && this.selected)) {
// don't clear selection if item same as current is selected
- this.Grid.ClearSelection(null,'GridItem.Click');
+ if (!this.Grid.StickySelection) {
+ this.Grid.ClearSelection(null,'GridItem.Click');
+ }
+ else {
+ if (this.Grid.LastSelectedId == this.ItemId) {
+ return;
+ }
+ }
this.Toggle();
}
}
}
this.Grid.CheckDependencies('GridItem.Click');
e.cancelBubble = true;
}
GridItem.prototype.cbClick = function (ev)
{
var e = is.ie ? window.event : ev;
if (this.Grid.RadioMode) this.Grid.ClearSelection(null,'GridItem.cbClick');
this.Grid.ClearAlternativeGridsSelection('GridItem.cbClick');
this.Toggle();
this.Grid.CheckDependencies('GridItem.cbClick');
e.cancelBubble = true;
}
GridItem.prototype.DblClick = function (ev)
{
var e = is.ie ? window.event : ev;
this.Grid.Edit();
}
GridItem.prototype.Toggle = function ()
{
if (this.selected) this.UnSelect()
else {
this.Grid.LastSelectedSequence = this.sequence;
this.Select();
}
}
GridItem.prototype.FallsInRange = function (from, to)
{
return (from <= to) ?
(this.sequence >= from && this.sequence <= to) :
(this.sequence >= to && this.sequence <= from);
}
function Grid(prefix, class_on, class_off, dbl_click, toolbar)
{
this.prefix = prefix;
this.class_on = class_on;
this.class_off = class_off;
this.Items = new Array();
this.LastSelectedSequence = 1;
this.LastSelectedId = null;
this.DblClick = dbl_click;
this.ToolBar = toolbar;
this.SelectedCount = 0;
this.AlternativeGrids = new Array();
this.DependantButtons = new Array();
this.RadioMode = false;
+
+ // K3-style sticky selection, selection an item does not unselect currently selected
+ // even w/o Ctrl key pressed
+ this.StickySelection = false;
}
Grid.prototype.AddItem = function( an_item ) {
this.Items[an_item.id] = an_item;
}
Grid.prototype.AddItemsByIdMask = function ( tag, mask, cb_mask ) {
var $item_id=0;
elements = document.getElementsByTagName(tag.toUpperCase());
for (var i=0; i < elements.length; i++) {
if ( typeof(elements[i].id) == 'undefined') {
continue;
}
if ( !elements[i].id.match(mask)) continue;
$item_id=RegExp.$1;
cb_name = cb_mask.replace('$$ID$$',$item_id);
cb = document.getElementById(cb_name);
if (typeof(cb) == 'undefined') alert ('No Checkbox defined for item '+elements[i].id);
this.AddItem( new GridItem( this, elements[i], cb, $item_id, this.class_on, this.class_off ) );
}
}
Grid.prototype.InitItems = function() {
for (var i in this.Items) {
this.Items[i].Init();
}
this.ClearSelection( true,'Grid.InitItems' );
+
+ var a_Grid = this;
+ addEvent(document, 'keyup', function(ev) {
+ var e = !is.ie ? ev : window.event;
+ switch (e.keyCode) {
+ case 65:
+// if (e.ctrlKey) alert('Ctrl A');
+ a_Grid.SelectAll();
+ ClearBrowserSelection()
+// window.setTimeout(ClearBrowserSelection, 500);
+ break;
+ case 27:
+ a_Grid.ClearSelection();
+ break;
+ case 33:
+ case 37:
+ //alert('<-') // go to prev page here
+ break;
+ case 34:
+ case 39:
+ // alert('->') // go to next page here
+ break;
+ case 88:
+ ClearBrowserSelection();
+ break;
+ }
+ });
}
Grid.prototype.DisableClicking = function() {
for (var i in this.Items) {
this.Items[i].DisableClicking();
}
this.ClearSelection( true, 'Grid.DisableClicking' );
}
Grid.prototype.ClearSelection = function( force, called_from ) {
// alert('selection clear. force: '+force+'; called_from: '+called_from);
if (typeof(force) == 'undefined') force = false;
if (this.CountSelected() == 0 && !force) return;
for (var i in this.Items) {
this.Items[i].UnSelect(force);
}
this.SelectedCount = 0;
this.CheckDependencies('Grid.ClearSelection');
}
Grid.prototype.GetSelected = function() {
var $ret = new Array();
for (var i in this.Items) {
if (this.Items[i].selected) {
$ret[$ret.length] = this.Items[i].ItemId;
}
}
return $ret;
}
Grid.prototype.InvertSelection = function() {
for (var i in this.Items)
{
if( this.Items[i].selected )
{
this.Items[i].UnSelect();
}
else
{
this.Items[i].Select();
}
}
this.CheckDependencies('Grid.InvertSelection');
}
Grid.prototype.SelectAll = function() {
for (var i in this.Items) {
this.Items[i].Select();
}
this.CheckDependencies('Grid.SelectAll');
this.ClearAlternativeGridsSelection('Grid.SelectAll');
}
Grid.prototype.SelectRangeUpTo = function( last_sequence ) {
for (var i in this.Items) {
if (this.Items[i].FallsInRange(this.LastSelectedSequence, last_sequence)) {
this.Items[i].Select();
}
}
}
Grid.prototype.CountSelected = function ()
{
return this.SelectedCount;
}
Grid.prototype.Edit = function() {
if ( this.CountSelected() == 0 ) return;
this.DblClick();
}
Grid.prototype.SetDependantToolbarButtons = function($buttons, $direct, $mode) {
if (!isset($direct)) $direct = true; // direct (use false for invert mode)
if (!isset($mode)) $mode = 1; // enable/disable (use 2 for show/hide mode)
for (var i in $buttons) {
this.DependantButtons.push(new Array($buttons[i], $direct, $mode));
}
//this.DependantButtons = buttons;
this.CheckDependencies('Grid.SetDependantToolbarButtons');
}
Grid.prototype.CheckDependencies = function($called_from)
{
// alert('prefix: ' + this.prefix + '; ' + $called_from + ' -> Grid.CheckDependencies');
var enabling = (this.CountSelected() > 0);
for (var i in this.DependantButtons) {
if (this.DependantButtons[i][0].match("portal:(.*)")) {
button_name = RegExp.$1;
if (toolbar) {
if (enabling == this.DependantButtons[i][1]) {
toolbar.enableButton(button_name, true);
}
else
{
toolbar.disableButton(button_name, true);
}
}
}
else {
if (this.DependantButtons[i][2] == 1) {
this.ToolBar.SetEnabled(this.DependantButtons[i][0], enabling == this.DependantButtons[i][1]);
}
else {
this.ToolBar.SetVisible(this.DependantButtons[i][0], enabling == this.DependantButtons[i][1]);
}
}
}
//if (enabling) this.ClearAlternativeGridsSelection('Grid.CheckDependencies');
}
Grid.prototype.ClearAlternativeGridsSelection = function (called_from)
{
$GridManager.ClearAlternativeGridsSelection(this.prefix);
}
Grid.prototype.AddAlternativeGrid = function (alt_grid, reciprocal)
{
var $dst_prefix = typeof('alt_grid') == 'string' ? alt_grid : alt_grid.prefix;
$GridManager.AddAlternativeGrid(this.prefix, $dst_prefix, reciprocal);
}
Grid.prototype.FirstSelected = function ()
{
min_sequence = null;
var res = null
for (var i in this.Items) {
if (!this.Items[i].selected) continue;
if (min_sequence == null)
min_sequence = this.Items[i].sequence;
if (this.Items[i].sequence <= min_sequence) {
res = this.Items[i].ItemId;
min_sequence = this.Items[i].sequence;
}
}
return res;
}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (revision 7070)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (revision 7071)
@@ -1,794 +1,790 @@
var sheetRules; // all rules in stylesheet Set by initStyleChange()
var currentRule; // which rule are we editing? Set by assignRule()
var defaultStyles = new Array();
function StyleManager() {}
StyleManager.InitStyles = function() {
if (!document.styleSheets) return;
var sheets = document.styleSheets;
this.Map = new Object();
// alert('total '+sheets.length+' sheets')
for (var i=0;i<sheets.length;i++) {
var currentSheet = sheets[i];
if (currentSheet.cssRules)
sheetRules = currentSheet.cssRules
else if (currentSheet.rules)
sheetRules = currentSheet.rules;
else {
// alert('bad sheet '+currentSheet.href);
continue;
}
// alert('sheet: '+currentSheet.href)
for (var ii=0;ii<sheetRules.length;ii++) {
var value = sheetRules[ii].selectorText;
if (value.match(',')) { // Mozilla does not break comma-separated selectors into separate rules...
var subselectors = value.split(',');
for (var sub in subselectors) {
var real_name = subselectors[sub].replace(/^[ \t]*(.*)[ \t]*/, '$1');
this.Map[real_name] = sheetRules[ii]
}
}
else {
this.Map[value.toLowerCase()] = sheetRules[ii];
}
}
}
this.Inited = true;
// preg_print_pre(this.Map, /last/);
}
StyleManager.ChangeStyle = function(selector, style, value)
{
if (!this.Inited) this.InitStyles()
rule = this.Map[selector.toLowerCase()];
if (!rule) {
alert('rule '+selector+' not found')
return;
}
rule.style[style] = value;
}
function preg_print_pre(obj, reg)
{
if (!reg) reg = /.*/;
var p = ''
for (var prop in obj) {
if (prop.match(reg) ) {
p += prop + ': '+obj[prop] + '\n'
}
}
alert(p)
}
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curleft,curtop];
}
var startTime,endTime;
function getDimensions(obj) {
- var style,correction,height
+ var style
if (obj.currentStyle) {
style = obj.currentStyle;
}
else {
style = getComputedStyle(obj,'');
}
padding = [parseInt(style.paddingTop), parseInt(style.paddingRight), parseInt(style.paddingBottom), parseInt(style.paddingLeft)]
border = [parseInt(style.borderTopWidth), parseInt(style.borderRightWidth), parseInt(style.borderBottomWidth), parseInt(style.borderLeftWidth)]
for (var i in padding) if ( isNaN( padding[i] ) ) padding[i] = 0
for (var i in border) if ( isNaN( border[i] ) ) border[i] = 0
- correction = padding[0] + padding[2]; // + border[0] + border[2]
-
- height = obj.clientHeight - correction
-
var result = new Object();
result.innerHeight = obj.clientHeight - padding[0] - padding[2];
result.innerWidth = obj.clientWidth - padding[1] - padding[3];
result.padding = padding;
result.borders = border;
return result;
}
var profile = 0;
var startTime = new Date().getTime();
function Profile(message,force)
{
if (profile || force) {
endTime = new Date().getTime();
alert(message+' took '+(endTime-startTime)+' ms?')
startTime = new Date().getTime();
}
}
function GridScroller(grid_id, w, h)
{
this.GridId = grid_id
this.Footer = false;
this.LeftCells = 0;
this.LeftWidth = 0;
this.BottomOffset = 0;
this.Width = w;
this.Height = h;
this.AutoWidth = true;
this.ScrollerW = 0;
this.ScrollerH = 0;
this.MinWidths = [];
this.IDs = [];
this.Rendered = false;
}
GridScroller.prototype.Render = function(id)
{
// alert('rendering '+( id ? id : 'defulat'))
startTime = new Date().getTime();
html = this.GetHTML();
if (id && id != '') {
document.getElementById(id).innerHTML = '<div id="main_div_'+this.GridId+'">'+html+'</div>';
}
else {
if (this.Rendered) {
this.Render('main_div_'+this.GridId);
return;
}
document.write('<div id="main_div_'+this.GridId+'">'+html+'</div>');
}
this.Rendered = true;
Profile('Preparing HTML and writing it')
document.body.style.height = '100%';
document.body.style.overflow = 'hidden';
document.body.scroll = 'no'
this.SetReferences()
this.ScrollerW = this.MainInner.offsetWidth - this.MainInner.clientWidth
this.ScrollerH = this.MainInner.offsetHeight - this.MainInner.clientHeight
if (!this.UpdateColWidths()) return;
// Profile('UpdateColWidths');
if (this.Width == 'auto') {
this.Resize( this.GetAutoSize() );
}
else {
this.Resize();
}
// Profile('Resizing');
this.TheGrid.style.visibility = 'visible'
this.MainScroller.style.visibility = 'visible'
var the_grid = this;
if (document.all) {
$status = window.attachEvent('onresize', function(ev) { the_grid.AutoResize() });
} else {
$status = window.addEventListener('resize', function(ev) { the_grid.AutoResize() }, true);
}
Profile('Finalizng', 0);
}
GridScroller.prototype.SetReferences = function() {
this.MainOuter = document.getElementById('outer_main_'+this.GridId );
this.MainInner = document.getElementById('inner_main_'+this.GridId)
this.MainScroller = document.getElementById('main_scroller_'+this.GridId)
this.TheGrid = document.getElementById(this.GridId );
this.HeadTable = document.getElementById('header_'+this.GridId);
this.HeadScroller = document.getElementById('inner_header_'+this.GridId);
this.HeadOuter = document.getElementById('outer_header_'+this.GridId);
this.DataTable = document.getElementById('data_'+this.GridId);
this.DataScroller = document.getElementById('inner_data_'+this.GridId);
this.DataOuter = document.getElementById('outer_data_'+this.GridId);
if (this.HasFooter) {
this.FooterTable = document.getElementById('footer_'+this.GridId);
this.FooterScroller = document.getElementById('inner_footer_'+this.GridId);
this.FooterOuter = document.getElementById('outer_footer_'+this.GridId);
}
if (this.LeftCells != 0) {
this.LeftHeaderTable = document.getElementById('left_header_'+this.GridId);
this.LeftHeaderScroller = document.getElementById('inner_left_header_'+this.GridId);
this.LeftHeaderOuter = document.getElementById('outer_left_header_'+this.GridId);
this.LeftDataTable = document.getElementById('left_data_'+this.GridId);
this.LeftDataScroller = document.getElementById('inner_left_data_'+this.GridId);
this.LeftDataOuter = document.getElementById('outer_left_data_'+this.GridId);
if (this.HasFooter) {
this.LeftFooterTable = document.getElementById('left_footer_'+this.GridId);
this.LeftFooterScroller = document.getElementById('inner_left_footer_'+this.GridId);
this.LeftFooterOuter = document.getElementById('outer_left_footer_'+this.GridId);
}
}
this.DataScroller.TheGrid = this;
this.MainInner.TheGrid = this;
this.Dot = document.getElementById('dot_'+this.GridId)
// this.MainOuter.style.border = '5px solid red';
// this.MainOuter.style.padding = '30px';
this.MainOuter.className = 'grid-scrollable'
if (!is.ie) {
this.MainOuter.style.marginLeft = '-1px';
}
}
GridScroller.prototype.UpdateColWidths = function() {
var data_cf = 1;
var count = 1;
var header_cf = 0;
var footer_cf = 0.2;
// alert('MinWidths: '+this.MinWidths.length + ' vs Data ' + this.Header[0].length)
if (this.MinWidths.length < this.Header[0].length) {
var widths = new Array();
var total = 0;
StyleManager.ChangeStyle('td.grid-header-last-cell', 'width', '123px')
StyleManager.ChangeStyle('td.grid-data-last-cell', 'width', 'auto')
if (this.HasFooter()) {
StyleManager.ChangeStyle('td.grid-footer-last-cell', 'width', 'auto')
}
if (this.LeftCells) {
widths.push(this.LeftHeaderTable.clientWidth)
}
var header_widths = this.GetWidths('header_'+this.GridId);
var data_widths = this.GetWidths('data_'+this.GridId);
/*if (this.HasFooter()) {
var footer_widths = this.GetWidths('footer_'+this.GridId);
data_cf -= footer_cf;
count++;
}*/
for (var i=0; i<header_widths.length; i++)
{
target = data_widths[i] ? data_widths[i] : header_widths[i];
if (target < header_widths[i]) target = header_widths[i];
widths.push(target);
total += target;
}
this.MinWidths = widths;
StyleManager.ChangeStyle('td.grid-header-last-cell', 'width', '100%')
StyleManager.ChangeStyle('td.grid-data-last-cell', 'width', '100%')
if (this.HasFooter()) {
StyleManager.ChangeStyle('td.grid-footer-last-cell', 'width', '100%')
}
this.Render();
return false;
}
/*for (var i=0; i<header_widths.length; i++)
{
// target = Math.max( Math.max(header_widths[i], data_widths[i]), footer_widths[i]);
var sum = header_widths[i]*header_cf*count + (data_widths[i] ? data_widths[i]*data_cf*count : header_widths[i]*data_cf*count);
alert('sum ('+i+') = '+header_widths[i]+' * '+header_cf+' * '+count+' + '+data_widths[i]+' * '+data_cf+' * '+count+' = '+sum)
if (this.HasFooter()) {
sum += footer_widths[i]*footer_cf*count;
alert('sum + '+footer_widths[i]+' * '+footer_cf+' * '+count+' = '+sum)
}
target = Math.round( sum / count )
widths.push(target);
// alert('target: '+target)
total += target;
}
*/
Profile('Getting widths');
// preg_print_pre(widths)
// this.MinDataWidth = total;
// this.SetWidths('header_'+this.GridId, widths, 0, -1);
// this.SetWidths('data_'+this.GridId, widths, 0, -1);
if (this.LeftCells != 0) {
this.SetHeights('left_header_'+this.GridId, this.GetHeights('header_'+this.GridId));
this.SetHeights('left_data_'+this.GridId, this.GetHeights('data_'+this.GridId));
if (this.HasFooter()) {
this.SetHeights('left_footer_'+this.GridId, this.GetHeights('footer_'+this.GridId));
}
// alert('setting left widths')
// this.SetWidths('left_header_'+this.GridId, [30], 0, 1);
// this.SetWidths('left_data_'+this.GridId, [30], 0, 1);
}
// this.HeadTable.style.width = '100%'
if (this.HasFooter()) {
this.SetRowWidths('footer_'+this.GridId, widths);
this.FooterTable.style.width = '100%'
this.FooterHeight = this.FooterTable.offsetHeight;
this.FooterOuter.style.height = this.FooterHeight + 'px'
}
else {
this.FooterHeight = 0;
}
this.HeadHeight = this.HeadTable.offsetHeight;
this.DataHeight = this.DataTable.offsetHeight;
this.HeadOuter.style.height = (this.HeadHeight) + 'px'
if (this.LeftCells != 0) {
this.LeftWidth = Math.max(this.LeftHeaderTable.offsetWidth, this.LeftDataTable.offsetWidth)
this.LeftHeaderOuter.style.height = (this.HeadHeight) + 'px'
if (this.HasFooter()) {
this.LeftFooterOuter.style.height = (this.FooterHeight) + 'px'
this.LeftWidth = Math.max(this.LeftWidth, this.LeftFooterTable.offsetWidth);
}
}
this.MainInner.onscroll = function() {
this.TheGrid.SyncScroll()
}
this.MainOuter.style.width = 'auto'
if (document.all) {
this.DataScroller.onmousewheel = function(ev) {
var e = document.all ? window.event : ev;
this.TheGrid.MainInner.scrollTop += -e.wheelDelta/2
this.TheGrid.SyncScroll();
}
}
else {
this.DataScroller.addEventListener("DOMMouseScroll", function(ev) {
var e = document.all ? window.event : ev;
this.TheGrid.MainInner.scrollTop += e.detail*10
this.TheGrid.SyncScroll();
}, false);
}
return true;
}
GridScroller.prototype.SetRowWidths = function(table_id, widths, row, from, to)
{
if (!row) row = 0;
table = document.getElementById(table_id);
var inner_width = 0;
var final_width;
if (!from) from = 0;
if (!to) {
to = table.rows[row].cells.length;
}
else {
if (to < 0) {
to = table.rows[row].cells.length + to; // + because to is negative!
}
}
var min_offset = 0;
if (!table_id.match(/^left_/)) {
min_offset = this.LeftCells;
}
// alert('table: '+table_id+' min_offset: '+min_offset)
// alert('from: '+from+' to '+to)
for (var col=from; col < to; col++)
{
final_width = widths[col];
// alert('col: '+col)
if ( this.MinWidths[col+min_offset] && (final_width < this.MinWidths[col+min_offset])) {
// alert('correcting minwidth of '+col+': '+this.MinWidths[col]+ ' / '+final_width)
final_width = this.MinWidths[col+min_offset]
}
table.rows[row].cells[col].innerHTML = '<div style="width: '+(final_width) +'px; overflow: hidden; background-color: yellow;">' + table.rows[row].cells[col].innerHTML + '</div>'
// alert('setting '+widths[col]+' for col '+col)
// if (isNaN(final_width)) {
// alert('set '+table_id+'col '+col+' '+table.rows[0].cells[col].innerHTML+' to '+widths[col])
// }
table.rows[row].cells[col].style.width = final_width+'px';
// alert('set ('+col+')'+table.rows[0].cells[col].innerHTML+' to '+widths[col])
}
}
GridScroller.prototype.SetHeights = function(table_id, heights)
{
var table = document.getElementById(table_id);
for (var row=0; row<table.rows.length; row++)
{
var width = this.MinWidths[0] ? this.MinWidths[0] + 'px' : 'auto';
table.rows[row].cells[0].innerHTML = '<div style="display: table-cell; line-height: '+(heights[row])+'px; height: '+(heights[row]) +'px; width: '+width+'; overflow: hidden; background-color: inherit;">' + table.rows[row].cells[0].innerHTML + '</div>'
table.rows[row].cells[0].style.height = heights[row]+'px';
// heights.push( table.rows[0].cells[0].offsetHeight )
// alert('get ('+row+')'+table.rows[0].cells[0].innerHTML+' height '+table.rows[0].cells[0].offsetHeight)
}
// return heights;
}
GridScroller.prototype.SetWidths = function(table_id, widths, from, to)
{
var table = document.getElementById(table_id);
table.style.layout = 'fixed'
for (var row=0; row<1; row++)
{
this.SetRowWidths(table_id, widths, row, from, to)
}
table.style.width = '100%'
}
GridScroller.prototype.GetHeights = function(table_id)
{
var table = document.getElementById(table_id);
var heights = new Array();
- var style,height,correction;
+ var height
for (var row=0; row<table.rows.length; row++)
{
height = getDimensions( table.rows[row].cells[0] ).innerHeight
heights.push( height )
// alert('get ('+row+')'+table.rows[row].cells[0].innerHTML+' height (offset/client/computed (coorection)): '+table.rows[row].cells[0].offsetHeight + '/' + table.rows[row].cells[0].clientHeight + '/ ' +height + ' ('+correction+')')
}
return heights;
}
GridScroller.prototype.GetWidths = function(table_id)
{
var table = document.getElementById(table_id);
table.style.width = 'auto'
if (table.offsetWidth < document.body.clientWidth * 0.8) {
table.style.width = Math.round( document.body.clientWidth * 0.8 ) + 'px'
}
var widths = new Array();
var style;
if (!table.rows[0]) return [];
for (var col=0; col<table.rows[0].cells.length; col++)
{
widths.push( table.rows[0].cells[col].offsetWidth )
// alert('get ('+col+')'+table.rows[0].cells[col].innerHTML+' width '+table.rows[0].cells[col].offsetWidth)
}
return widths;
}
GridScroller.prototype.GetAutoSize = function()
{
this.MainOuter.style.width = 'auto'
var w = this.MainInner.offsetWidth;
var h = document.body.clientHeight;
var pos = findPos(this.MainOuter);
var dim = getDimensions(this.MainOuter);
h -= pos[1] + dim.padding[0] + dim.padding[2] + dim.borders[0] + dim.borders[2] + this.BottomOffset;
return [w,h]
}
GridScroller.prototype.AutoResize = function()
{
var obj = this;
if (this.ResizeHappening && this.ResizeTimer) {
window.clearTimeout(this.ResizeTimer);
this.ResizeTimer = false;
}
this.ResizeHappening = true;
this.ResizeTimer = window.setTimeout(function() {
obj.Resize( obj.GetAutoSize() );
obj.ResizeHappening = false;
// alert('resized')
}, 300)
}
GridScroller.prototype.Resize = function(w,h)
{
Profile('Resize 0')
if (typeof(w) == 'object') {
h = w[1];
w = w[0];
}
if (w) this.Width = w;
if (h) this.Height = h;
pos = findPos(this.Dot)
this.MainOuter.style.height = (this.Height)+'px'
this.MainOuter.style.width = (this.Width)+'px'
var data_width = this.DataTable.offsetWidth + this.LeftWidth;
var data_height = this.DataHeight + this.HeadHeight + this.FooterHeight;
scroller_height = data_width > this.Width ? this.ScrollerH : 0;
scroller_width = data_height > this.Height - scroller_height ? this.ScrollerW : 0;
scroller_height = data_width > this.Width - scroller_width ? this.ScrollerH : 0;
// alert('min: '+this.MinDataWidth+' pos: '+pos[0]+','+pos[1]+' scroller W x H: '+scroller_width+' x '+scroller_height+' will resize to '+this.Width+' x '+this.Height+' data: '+data_width+' x '+data_height)
this.TheGrid.style.left = (pos[0])+ 'px'
this.TheGrid.style.top = (pos[1]) + 'px'
this.HeadOuter.style.width = (this.Width -scroller_width -this.LeftWidth)+ 'px';
this.DataOuter.style.width = (this.Width -scroller_width -this.LeftWidth)+ 'px';
Profile('Resize 0.3')
if (this.LeftCells != 0) {
this.LeftHeaderOuter.style.width = (this.LeftWidth) + 'px'
this.LeftDataOuter.style.width = (this.LeftWidth) + 'px'
if (this.HasFooter()) {
this.LeftFooterOuter.style.width = (this.LeftWidth) + 'px'
}
}
Profile('Resize 1')
if (this.HasFooter()) {
this.FooterOuter.style.width = (this.Width -scroller_width -this.LeftWidth)+ 'px';
}
Profile('Resize 1.1')
if (data_height < this.Height - scroller_height) {
var adjusted_data_height = data_height - this.HeadHeight - this.FooterHeight
}
else {
var adjusted_data_height = this.Height - this.HeadHeight - this.FooterHeight - scroller_height
}
Profile('Resize 1.2')
this.DataOuter.style.height = adjusted_data_height + 'px'
if (this.LeftCells != 0) {
this.LeftDataOuter.style.height = adjusted_data_height + 'px'
}
Profile('Resize 2')
this.MainScroller.style.width = (this.HeadTable.offsetWidth + this.LeftWidth)+'px'
this.MainScroller.style.height = ( this.DataTable.offsetHeight + this.HeadHeight + this.FooterHeight)+'px'
Profile('Resize 0.1')
this.TheGrid.style.width = (this.Width - scroller_width) + 'px';
this.TheGrid.style.height = (this.Height - scroller_height) + 'px';
Profile('Resize 0.2')
Profile('Full resize')
}
GridScroller.prototype.SyncScroll = function()
{
this.HeadScroller.scrollLeft = this.MainInner.scrollLeft;
this.DataScroller.scrollLeft = this.MainInner.scrollLeft;
if (this.HasFooter()) {
this.FooterScroller.scrollLeft = this.MainInner.scrollLeft;
}
this.DataScroller.scrollTop = this.MainInner.scrollTop;
if (this.LeftCells != 0) {
this.LeftDataScroller.scrollTop = this.MainInner.scrollTop;
}
}
GridScroller.prototype.GetHTML = function()
{
w = this.Width;
h = this.Height;
var o = '';
o += this.CreateScroller( '<div id="main_scroller_'+this.GridId+'" style="background-color: inherit; position: relative; width: auto;"><img src="'+this.Spacer+'" id="dot_'+this.GridId+'" width="200" height="200"><br/><br/></div>', 100, 100, 'main_'+this.GridId, false, 1 );
o += '<div id="'+this.GridId+'" class="grid-container" style="background-color: inherit; top: 0px; visibility: hidden; z-index: 10; width: auto; height: '+300+'px; position: absolute; overflow: hidden;">';
var header = this.CreateScroller( this.CreateTable( this.GetHeaderCells(), 'header_'+this.GridId), 100, 10, 'header_'+this.GridId, true, 5 )
var data = this.CreateScroller( this.CreateTable( this.GetDataCells(), 'data_'+this.GridId ), 100, 10, 'data_'+this.GridId, true, 5 )
var footer = this.HasFooter() ? this.CreateScroller( this.CreateTable( this.GetFooterCells(), 'footer_'+this.GridId ), 100, 10, 'footer_'+this.GridId, true, 5 ) : '';
if (this.LeftCells != 0) {
var left_header = this.CreateScroller( this.CreateTable( this.GetLeftHeader(), 'left_header_'+this.GridId), 20, 10, 'left_header_'+this.GridId, true, 5 )
var left_data = this.CreateScroller( this.CreateTable( this.GetLeftData(), 'left_data_'+this.GridId), 20, 10, 'left_data_'+this.GridId, true, 5 )
var left_footer = this.CreateScroller( this.CreateTable( this.GetLeftFooter(), 'left_footer_'+this.GridId), 20, 10, 'left_footer_'+this.GridId, true, 5 )
o += '<table style="width: 100%; border-collapse: collapse;">'
o += '<tr><td style="vertical-align: top; margin: 0px; padding: 0px;">' + left_header + '</td>'
o += '<td style="vertical-align: top; margin: 0px; padding: 0px;">' + header + '</td></tr>'
o += '<tr><td style="vertical-align: top; margin: 0px; padding: 0px">' + left_data + '</td>'
o += '<td style="vertical-align: top; margin: 0px; padding: 0px">' + data + '</td></tr>'
if (this.HasFooter()) {
o += '<tr><td style="vertical-align: top; margin: 0px; padding: 0px">' + left_footer + '</td>'
o += '<td style="vertical-align: top; margin: 0px; padding: 0px">' + footer + '</td></tr>'
}
o += '</table>'
}
else {
o += header + data + footer;
}
o += '</div>';
return o
}
GridScroller.prototype.HasFooter = function()
{
return (this.Footer != false)
}
GridScroller.prototype.CreateTable = function(content, id)
{
return '<table style="width: 100%" id="'+id+'">'+content+'</table>';
}
GridScroller.prototype.CreateScroller = function(content, w, h, id, hidden, z)
{
if (hidden) {
overflow = 'hidden'
}
else {
overflow = 'auto'
}
if (!z) {
z = 0;
}
if (id && id != '') {
outer_id = 'id="outer_'+id+'"';
inner_id = 'id="inner_'+id+'"';
}
else {
outer_id = '';
inner_id = '';
}
var o = '';
o += '<div '+outer_id+' class="scroller-outer" style="z-index: '+z+'; width: '+w+'px; height: '+h+'px;">'
o += '<div '+inner_id+' class="scroller-inner" style="z-index: '+z+'; width: 100%; height: 100%; overflow: '+overflow+'; position: relative">'
o += content
o += '</div></div>'
return o
}
GridScroller.prototype.GetLeftHeader = function()
{
var o = '';
for (var row in this.Header) {
o +='<tr class="grid-header-row grid-header-row-'+row+'">'
for (var col=0; col<this.LeftCells; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
o += '<td class="grid-header-col-'+col+'"><div class="grid-cell-div" style="width: '+width+';">'+this.Header[row][col]+'</div></td>'
}
o += '</tr>'
}
return o
}
GridScroller.prototype.GetLeftData = function()
{
var o = '';
var even = false;
for (var row in this.Data) {
var id = this.IDs[row] ? 'id="left_'+this.IDs[row]+'"' : '';
o += even ? '<tr class="grid-row grid-row-even grid-row-'+row+'" '+id+'>' : '<tr class="grid-row grid-row-'+row+'" '+id+'>'
even = !even;
for (var col=0; col<this.LeftCells; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
o += '<td class="grid-col-'+col+'"><div class="grid-cell-div" style="width: '+width+';">'+this.Data[row][col]+'</div></td>'
}
o += '</tr>'
}
return o
}
GridScroller.prototype.GetLeftFooter = function()
{
var o = '';
if (this.HasFooter()) {
o += '<tr class="grid-footer-row">'
for (var col=0; col<this.LeftCells; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
o += '<td class="grid-footer-col-'+col+'"><div class="grid-cell-div" style="width: '+width+';">'+this.Footer[col]+'</div></td>'
}
o += '</tr>'
}
return o
}
GridScroller.prototype.GetHeaderCells = function()
{
var o = '';
for (var row in this.Header) {
o +='<tr class="grid-header-row grid-header-row-'+row+'">'
for (var col=this.LeftCells; col<this.Header[row].length; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
- o += '<td class="grid-header-col-'+col+'"><div class="grid-cell-div" style="width: '+width+';">'+this.Header[row][col]+'</div></td>'
+ o += '<td class="grid-header-col-'+col+'"><div class="grid-cell-div" style="background-color: inherit; width: '+width+';">'+this.Header[row][col]+'</div></td>'
}
o += '<td class="grid-header-last-cell"><img src="'+this.Spacer+'" width="1" height="1" alt=""/></td>'
o += '</tr>'
}
return o
/*var o = '<tr class="grid-header-row">'
for (var col=this.LeftCells; col<this.Header.length; col++) {
o += '<td class="grid-header-col-'+col+'">'+this.Header[col]+'</td>'
}
o += '<td class="grid-header-last-cell" style="width: auto"><img src="'+this.Spacer+'" width="1" height="1" alt=""/></td>'
o += '</tr>'
return o*/
}
GridScroller.prototype.GetDataCells = function()
{
var o = '';
var even = false;
var width;
for (var row in this.Data) {
var id = this.IDs[row] ? 'id="'+this.IDs[row]+'"' : '';
o += even ? '<tr class="grid-row grid-row-even grid-row-'+row+'" '+id+' sequence="'+(row+1)+'">' : '<tr class="grid-row grid-row-'+row+'" '+id+' sequence="'+(row+1)+'">'
even = !even;
for (var col=this.LeftCells; col<this.Data[row].length; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
o += '<td class="grid-col-'+col+'"><div class="grid-cell-div" style="width: '+width+';">'+this.Data[row][col]+'</div></td>'
}
o += '<td class="grid-data-last-cell"><img src="'+this.Spacer+'" width="1" height="1" alt=""/></td>'
o += '</tr>'
}
return o
}
GridScroller.prototype.GetFooterCells = function()
{
var o = '<tr class="grid-footer-row">'
for (var col=this.LeftCells; col<this.Footer.length; col++) {
width = this.MinWidths[col] ? this.MinWidths[col] + 'px' : 'auto';
o += '<td class="grid-footer-col-'+col+'">'+this.Footer[col]+'</td>'
}
o += '<td class="grid-footer-last-cell" style="width: 100%"><img src="'+this.Spacer+'" width="1" height="1" alt=""/></td>'
o += '</tr>'
return o
}
GridScroller.prototype.SetData = function(a_data)
{
this.Data = a_data;
}
GridScroller.prototype.SetHeader = function(a_header)
{
this.Header = a_header;
}
GridScroller.prototype.SetFooter = function(a_footer)
{
this.Footer = a_footer;
}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.10
\ No newline at end of property
+1.1.2.11
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon_left.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon_left.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon_right.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/icons/icon_right.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/sections_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/sections_list.tpl (revision 7070)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/sections_list.tpl (revision 7071)
@@ -1,56 +1,55 @@
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
<link rel="stylesheet" rev="stylesheet" href="incs/sections_list.css" type="text/css" />
-<body style="margin: 0px 8px 0px 8px; background-color: #fff;">
<inp2:m_DefineElement name="section_list_header" icon_module="">
<!-- section header -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr style="background: url(<inp2:$SectionPrefix_ModulePath module="#session#"/>img/logo_bg.gif) no-repeat top right;">
<td valign="top" class="admintitle" align="left" style="padding-top: 2px; padding-bottom: 2px;">
<inp2:m_if check="m_RecallEquals" name="section" value="in-portal:root">
<img width="46" height="46" src="<inp2:$SectionPrefix_ModulePath module="$icon_module"/>img/icons/<inp2:adm_GetSectionIcon icon="icon46_{$icon}"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$label" default="$label"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$label" default="$label"/>
<inp2:m_else/>
<img width="46" height="46" src="<inp2:$SectionPrefix_ModulePath module="$icon_module"/>img/icons/<inp2:adm_GetSectionIcon icon="icon46_{$icon}"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$label"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$label"/>
</inp2:m_if>
</td>
</tr>
</table>
<inp2:m_ParseBlock name="blue_bar" prefix="$SectionPrefix" title_preset="tree_#section#" icon="icon46_{$icon}"/>
</inp2:m_DefineElement>
<inp2:adm_PrintSection section_name="#session#" render_as="section_list_header"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_DefineElement name="section_element" icon_module="">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td class="subitem_icon">
<img src="<inp2:$SectionPrefix_ModulePath module="$icon_module"/>img/icons/icon46_list_<inp2:m_param name="icon"/>.gif" border="0" alt="<inp2:m_phrase name="$label"/>" align="absmiddle"/>
</td>
<td class="subitem_description">
<a href="<inp2:m_param name="section_url"/>" class="dLink" title="<inp2:m_phrase name="$label"/>" target="main"><inp2:m_phrase name="$label"/></a>
<inp2:m_if check="m_ParamEquals" name="is_tab" value="1">
<inp2:m_phrase name="la_Description_{$parent}"/>
<inp2:m_else/>
<inp2:m_phrase name="la_Description_{$section_name}"/>
</inp2:m_if>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_set odd_even="table_color1"/>
<inp2:adm_PrintSections block="section_element" section_name="#session#"/>
</table>
</td>
<td valign="top" align="right">
<inp2:adm_ModuleInclude template="summary/#section#"/>
</td>
</tr>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/sections_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2.2.1
\ No newline at end of property
+1.2.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (revision 7070)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (revision 7071)
@@ -1,1191 +1,1206 @@
if ( !( isset($init_made) && $init_made ) ) {
var Grids = new Array();
var Toolbars = new Array();
var $Menus = new Array();
var $ViewMenus = new Array();
var $nls_menus = new Array();
var $MenuNames = new Array();
var $form_name = 'kernel_form';
if(!$fw_menus) var $fw_menus = new Array();
var $env = '';
var submitted = false;
var $edit_mode = false;
var $init_made = true; // in case of double inclusion of script.js :)
// hook processing
var hBEFORE = 1; // this is const, but including this twice causes errors
var hAFTER = 2; // this is const, but including this twice causes errors
var $hooks = new Array();
}
function use_popups($prefix_special, $event) {
return $use_popups;
}
function getArrayValue()
{
var $value = arguments[0];
var $current_key = 0;
$i = 1;
while ($i < arguments.length) {
$current_key = arguments[$i];
if (isset($value[$current_key])) {
$value = $value[$current_key];
}
else {
return false;
}
$i++;
}
return $value;
}
function setArrayValue()
{
// first argument - array, other arguments - keys (arrays too), last argument - value
var $array = arguments[0];
var $current_key = 0;
$i = 1;
while ($i < arguments.length - 1) {
$current_key = arguments[$i];
if (!isset($array[$current_key])) {
$array[$current_key] = new Array();
}
$array = $array[$current_key];
$i++;
}
$array[$array.length] = arguments[arguments.length - 1];
}
function processHooks($function_name, $hook_type, $prefix_special)
{
var $i = 0;
var $local_hooks = getArrayValue($hooks, $function_name, $hook_type);
while($i < $local_hooks.length) {
$local_hooks[$i]($function_name, $prefix_special);
$i++;
}
}
function registerHook($function_name, $hook_type, $hook_body)
{
setArrayValue($hooks, $function_name, $hook_type, $hook_body);
}
function resort_grid($prefix_special, $field, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field($prefix_special + '_Sort1', $field);
submit_event($prefix_special, 'OnSetSorting', null, null, $ajax);
}
function direct_sort_grid($prefix_special, $field, $direction, $field_pos, $ajax)
{
if(!isset($field_pos)) $field_pos = 1;
set_form($prefix_special, $ajax);
set_hidden_field($prefix_special+'_Sort'+$field_pos,$field);
set_hidden_field($prefix_special+'_Sort'+$field_pos+'_Dir',$direction);
set_hidden_field($prefix_special+'_SortPos',$field_pos);
submit_event($prefix_special,'OnSetSortingDirect', null, null, $ajax);
}
function reset_sorting($prefix_special)
{
submit_event($prefix_special,'OnResetSorting');
}
function set_per_page($prefix_special, $per_page, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field($prefix_special + '_PerPage', $per_page);
submit_event($prefix_special, 'OnSetPerPage', null, null, $ajax);
}
function submit_event(prefix_special, event, t, form_action, $ajax)
{
if ($ajax) {
return $Catalog.submit_event(prefix_special, event, t);
}
if (event) {
set_hidden_field('events[' + prefix_special + ']', event);
}
if (t) set_hidden_field('t', t);
if (form_action) {
var old_env = '';
if (!form_action.match(/\?/)) {
document.getElementById($form_name).action.match(/.*(\?.*)/);
old_env = RegExp.$1;
}
document.getElementById($form_name).action = form_action + old_env;
}
submit_kernel_form();
}
function submit_action($url, $action)
{
$form = document.getElementById($form_name);
$form.action = $url;
set_hidden_field('Action', $action);
submit_kernel_form();
}
function show_form_data()
{
var $kf = document.getElementById($form_name);
$ret = '';
for(var i in $kf.elements)
{
$elem = $kf.elements[i];
$ret += $elem.id + ' = ' + $elem.value + "\n";
}
alert($ret);
}
function submit_kernel_form()
{
if (submitted) {
return;
}
submitted = true;
var $form = document.getElementById($form_name);
processHooks('SubmitKF', hBEFORE);
if (typeof $form.onsubmit == "function") {
$form.onsubmit();
}
$form.submit();
processHooks('SubmitKF', hAFTER);
$form.target = '';
set_hidden_field('t', t);
window.setTimeout(function() {submitted = false}, 500);
}
function set_event(prefix_special, event)
{
var event_field=document.getElementById('events[' + prefix_special + ']');
if(isset(event_field))
{
event_field.value = event;
}
}
function isset(variable)
{
if(variable==null) return false;
return (typeof(variable)=='undefined')?false:true;
}
function in_array(needle, haystack)
{
return array_search(needle, haystack) != -1;
}
function array_search(needle, haystack)
{
for (var i=0; i<haystack.length; i++)
{
if (haystack[i] == needle) return i;
}
return -1;
}
function print_pre(variable, msg)
{
if (!isset(msg)) msg = '';
var s = msg;
for (prop in variable) {
s += prop+" => "+variable[prop] + "\n";
}
alert(s);
}
function go_to_page($prefix_special, $page, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field($prefix_special + '_Page', $page);
submit_event($prefix_special, null, null, null, $ajax);
}
function go_to_list(prefix_special, tab)
{
set_hidden_field(prefix_special+'_GoTab', tab);
submit_event(prefix_special,'OnUpdateAndGoToTab',null);
}
function go_to_tab(prefix_special, tab)
{
set_hidden_field(prefix_special+'_GoTab', tab);
submit_event(prefix_special,'OnPreSaveAndGoToTab',null);
}
function go_to_id(prefix_special, id)
{
set_hidden_field(prefix_special+'_GoId', id);
submit_event(prefix_special,'OnPreSaveAndGo')
}
// in-portal compatibility functions: begin
function getScriptURL($script_name, tpl)
{
tpl = tpl ? '-'+tpl : '';
var $asid = get_hidden_field('sid');
return base_url+$script_name+'?env='+( isset($env)&&$env?$env:$asid )+tpl+'&en=0';
}
function OpenEditor(extra_env,TargetForm,TargetField)
{
// var $url = getScriptURL('admin/editor/editor_new.php');
var $url = getScriptURL('admin/index.php', 'popups/editor');
// alert($url);
$url = $url+'&TargetForm='+TargetForm+'&TargetField='+TargetField+'&destform=popup';
if(extra_env.length>0) $url += extra_env;
openwin($url,'html_edit',800,575);
}
function OpenUserSelector(extra_env,TargetForm,TargetField)
{
var $url = getScriptURL('admin/users/user_select.php');
$url += '&destform='+TargetForm+'&Selector=radio&destfield='+TargetField+'&IdField=Login';
if(extra_env.length>0) $url += extra_env;
openwin($url,'user_select',800,575);
return false;
}
function OpenCatSelector(extra_env)
{
var $url = getScriptURL('admin/cat_select.php');
if(extra_env.length>0) $url += extra_env;
openwin($url,'catselect',750,400);
}
function OpenItemSelector(extra_env,$TargetForm)
{
var $url = getScriptURL('admin/relation_select.php') + '&destform='+$TargetForm;
if(extra_env.length>0) $url += extra_env;
openwin($url,'groupselect',750,400);
}
function OpenUserEdit($user_id, $extra_env)
{
var $url = getScriptURL('admin/users/adduser.php') + '&direct_id=' + $user_id;
if( isset($extra_env) ) $url += $extra_env;
window.location.href = $url;
}
function OpenLinkEdit($link_id, $extra_env)
{
var $url = getScriptURL('in-link/admin/addlink.php') + '&item=' + $link_id;
if( isset($extra_env) ) $url += $extra_env;
window.location.href = $url;
}
function OpenHelp($help_link)
{
// $help_link.match('http://(.*).lv/in-commerce/admin(.*)');
// alert(RegExp.$2);
openwin($help_link,'HelpPopup',750,400);
}
function openEmailSend($url, $type, $prefix_special)
{
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
var $prev_opener = get_hidden_field('m_opener');
$kf.action = $url;
set_hidden_field('m_opener', 'p');
$kf.target = 'sendmail';
set_hidden_field('idtype', 'group');
set_hidden_field('idlist', Grids[$prefix_special].GetSelected().join(',') );
openwin('','sendmail',750,400);
submit_kernel_form();
$kf.action = $prev_action;
set_hidden_field('m_opener', $prev_opener);
}
// in-portal compatibility functions: end
function InitTranslator(prefix, field, t, multi_line)
{
var $kf = document.getElementById($form_name);
var $window_name = 'select_'+t.replace(/(\/|-)/g, '_');
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(m[^:]+)');
$regex = $regex.exec($kf.action);
// set_hidden_field('return_m', $regex[4]);
var $prev_opener = get_hidden_field('m_opener');
if (!isset(multi_line)) multi_line = 0;
openwin('', $window_name, 750, 400);
// set_hidden_field('return_template', $kf.elements['t'].value); // where should return after popup is done
set_hidden_field('m_opener', 'p');
set_hidden_field('translator_wnd_name', $window_name);
set_hidden_field('translator_field', field);
set_hidden_field('translator_t', t);
set_hidden_field('translator_prefixes', prefix);
set_hidden_field('translator_multi_line', multi_line);
$kf.target = $window_name;
return $prev_opener;
}
function PreSaveAndOpenTranslator(prefix, field, t, multi_line)
{
var $prev_opener = InitTranslator(prefix, field, t, multi_line);
var split_prefix = prefix.split(',');
submit_event(split_prefix[0], 'OnPreSaveAndOpenTranslator');
set_hidden_field('m_opener', $prev_opener);
}
function PreSaveAndOpenTranslatorCV(prefix, field, t, resource_id, multi_line)
{
var $prev_opener = InitTranslator(prefix, field, t, multi_line);
set_hidden_field('translator_resource_id', resource_id);
var split_prefix = prefix.split(',');
submit_event(split_prefix[0],'OnPreSaveAndOpenTranslator');
set_hidden_field('m_opener', $prev_opener);
}
function openTranslator(prefix,field,url,wnd)
{
var $kf = document.getElementById($form_name);
set_hidden_field('trans_prefix', prefix);
set_hidden_field('trans_field', field);
set_hidden_field('events[trans]', 'OnLoad');
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(.*)');
var $t = $regex.exec(url)[3];
$kf.target = wnd;
submit_event(prefix,'',$t,url);
}
function openwin($url,$name,$width,$height)
{
// prevent window from opening larger, then screen resolution on user's computer (to Kostja)
// alert('openwin: name = ['+$name+']');
var left = Math.round((screen.width - $width)/2);
var top = Math.round((screen.height - $height)/2);
cur_x = is.ie ? window.screenLeft : window.screenX;
cur_y = is.ie ? window.screenTop : window.screenY;
// alert('current X,Y: '+cur_x+','+cur_y+' target x,y: '+left+','+top);
var $window_params = 'left='+left+',top='+top+',width='+$width+',height='+$height+',status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no';
return window.open($url,$name,$window_params);
}
function OnResizePopup(e) {
if (!document.all) {
var $winW = window.innerWidth;
var $winH = window.innerHeight;
}
else {
var $winW = window.document.body.offsetWidth;
var $winH = window.document.body.offsetHeight;
}
window.status = '[width: ' + $winW + '; height: ' + $winH + ']';
}
function opener_action(new_action)
{
var $prev_opener = get_hidden_field('m_opener');
set_hidden_field('m_opener', new_action);
return $prev_opener;
}
function open_popup($prefix_special, $event, $t, $window_size) {
if (!$window_size) {
// if no size given, then query it from ajax
var $default_size = '750x400';
var $pm = getFrame('head').$popup_manager;
if ($pm) {
// popup manager was found in head frame
$pm.ResponceFunction = function ($responce) {
if (!$responce.match(/([\d]+)x([\d]+)/)) {
// invalid responce was received, may be php fatal error during AJAX request
$responce = $default_size;
}
open_popup($prefix_special, $event, $t, $responce);
}
$pm.GetSize($t);
return ;
}
$window_size = $default_size;
}
var $kf = document.getElementById($form_name);
var $window_name = $t.replace(/(\/|-)/g, '_'); // replace "/" and "-" with "_"
$window_size = $window_size.split('x');
openwin('', $window_name, $window_size[0], $window_size[1]);
$kf.target = $window_name;
var $prev_opener = opener_action('p');
submit_event($prefix_special, $event, $t);
opener_action($prev_opener); // restore opener in parent window
}
function openSelector($prefix, $url, $dst_field, $window_size, $event)
{
// get template name from url
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(m[^:]+)');
$regex = $regex.exec($url);
var $t = $regex[3];
// substitute form action with selector's url
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
$kf.action = $url;
// check parameter values
if (!isset($event)) $event = '';
// set variables need for selector to work
processHooks('openSelector', hBEFORE);
set_hidden_field('main_prefix', $prefix);
set_hidden_field('dst_field', $dst_field);
open_popup($prefix, $event, $t);
// restore form action back
processHooks('openSelector', hAFTER);
$kf.action = $prev_action;
}
function std_precreate_item(prefix_special, edit_template)
{
set_hidden_field(prefix_special+'_mode', 't');
if (use_popups(prefix_special, 'OnPreCreate')) {
open_popup(prefix_special, 'OnPreCreate', edit_template);
}
else {
opener_action('d');
submit_event(prefix_special,'OnPreCreate', edit_template);
}
}
function std_new_item(prefix_special, edit_template)
{
if (use_popups(prefix_special, 'OnNew')) {
open_popup(prefix_special, 'OnNew', edit_template);
}
else {
opener_action('d');
submit_event(prefix_special,'OnNew', edit_template);
}
}
function std_edit_item(prefix_special, edit_template)
{
set_hidden_field(prefix_special+'_mode', 't');
if (use_popups(prefix_special, 'OnEdit')) {
open_popup(prefix_special, 'OnEdit', edit_template);
}
else {
opener_action('d');
submit_event(prefix_special,'OnEdit',edit_template);
}
}
function std_edit_temp_item(prefix_special, edit_template)
{
if (use_popups(prefix_special, '')) {
open_popup(prefix_special, '', edit_template);
}
else {
opener_action('d');
submit_event(prefix_special,'',edit_template);
}
}
function std_delete_items(prefix_special, t, $ajax)
{
if (inpConfirm('Are you sure you want to delete selected items?')) {
submit_event(prefix_special, 'OnMassDelete', t, null, $ajax);
}
}
// set current form base on ajax
function set_form($prefix_special, $ajax)
{
if ($ajax) {
$form_name = $Catalog.queryTabRegistry('prefix', $prefix_special, 'tab_id') + '_form';
}
}
// sets hidden field value
// if the field does not exist - creates it
function set_hidden_field($field_id, $value)
{
var $kf = document.getElementById($form_name);
var $field = $kf.elements[$field_id];
if ($field) {
$field.value = $value;
return true;
}
$field = document.createElement('INPUT');
$field.type = 'hidden';
$field.name = $field_id;
$field.id = $field_id;
$field.value = $value;
$kf.appendChild($field);
return false;
}
// sets hidden field value
// if the field does not exist - creates it
function setInnerHTML($field_id, $value)
{
var $element = document.getElementById($field_id);
if (!$element) return false;
$element.innerHTML = $value;
}
function get_hidden_field($field)
{
var $kf = document.getElementById($form_name);
return $kf.elements[$field] ? $kf.elements[$field].value : false;
}
function search($prefix_special, $grid_name, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field('grid_name', $grid_name);
submit_event($prefix_special, 'OnSearch', null, null, $ajax);
}
function search_reset($prefix_special, $grid_name, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field('grid_name', $grid_name);
submit_event($prefix_special, 'OnSearchReset', null, null, $ajax);
}
function search_keydown($event, $prefix_special, $grid, $ajax)
{
$event = $event ? $event : event;
if (window.event) {// IE
var $key_code = $event.keyCode;
}
else if($event.which) { // Netscape/Firefox/Opera
var $key_code = $event.which;
}
switch ($key_code) {
case 13:
search($prefix_special, $grid, parseInt($ajax));
break;
case 27:
search_reset($prefix_special, $grid, parseInt($ajax));
break;
}
}
function getRealLeft(el)
{
if (typeof(el) == 'string') {
el = document.getElementById(el);
}
xPos = el.offsetLeft;
tempEl = el.offsetParent;
while (tempEl != null)
{
xPos += tempEl.offsetLeft;
tempEl = tempEl.offsetParent;
}
// if (obj.x) return obj.x;
return xPos;
}
function getRealTop(el)
{
if (typeof(el) == 'string') {
el = document.getElementById(el);
}
yPos = el.offsetTop;
tempEl = el.offsetParent;
while (tempEl != null)
{
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
// if (obj.y) return obj.y;
return yPos;
}
function show_viewmenu_old($toolbar, $button_id)
{
var $img = $toolbar.GetButtonImage($button_id);
var $pos_x = getRealLeft($img) - ((document.all) ? 6 : -2);
var $pos_y = getRealTop($img) + 32;
var $prefix_special = '';
window.triedToWriteMenus = false;
if($ViewMenus.length == 1)
{
$prefix_special = $ViewMenus[$ViewMenus.length-1];
$fw_menus[$prefix_special+'_view_menu']();
$Menus[$prefix_special+'_view_menu'].writeMenus('MenuContainers['+$prefix_special+']');
window.FW_showMenu($Menus[$prefix_special+'_view_menu'], $pos_x, $pos_y);
}
else
{
// prepare menus
for(var $i in $ViewMenus)
{
$prefix_special = $ViewMenus[$i];
$fw_menus[$prefix_special+'_view_menu']();
}
$Menus['mixed'] = new Menu('ViewMenu_mixed');
// merge menus into new one
for(var $i in $ViewMenus)
{
$prefix_special = $ViewMenus[$i];
$Menus['mixed'].addMenuItem( $Menus[$prefix_special+'_view_menu'] );
}
$Menus['mixed'].writeMenus('MenuContainers[mixed]');
window.FW_showMenu($Menus['mixed'], $pos_x, $pos_y);
}
}
var nlsMenuRendered = false;
function show_viewmenu($toolbar, $button_id)
{
if($ViewMenus.length == 1) {
$prefix_special = $ViewMenus[$ViewMenus.length-1];
menu_to_show = $prefix_special+'_view_menu';
}
else
{
mixed_menu = menuMgr.createMenu(rs('mixed_menu'));
mixed_menu.applyBorder(false, false, false, false);
mixed_menu.dropShadow("none");
mixed_menu.showIcon = true;
// merge menus into new one
for(var $i in $ViewMenus)
{
$prefix_special = $ViewMenus[$i];
mixed_menu.addItem( rs($prefix_special+'.view.menu.mixed'),
$MenuNames[$prefix_special+'_view_menu'],
'javascript:void()', null, true, null,
rs($prefix_special+'.view.menu'),$MenuNames[$prefix_special+'_view_menu'] );
}
menu_to_show = 'mixed_menu';
}
renderMenus();
nls_showMenu(rs(menu_to_show), $toolbar.GetButtonImage($button_id))
}
function renderMenus()
{
menuMgr.renderMenus('nlsMenuPlace');
nlsMenuRendered = true;
}
function set_window_title($title)
{
var $window = window;
if($window.parent) $window = $window.parent;
$window.document.title = (main_title.length ? main_title + ' - ' : '') + $title;
}
function set_filter($prefix_special, $filter_id, $filter_value, $ajax)
{
set_form($prefix_special, $ajax);
set_hidden_field('filter_id', $filter_id);
set_hidden_field('filter_value', $filter_value);
submit_event($prefix_special, 'OnSetFilter', null, null, $ajax);
}
function filters_remove_all($prefix_special, $ajax)
{
set_form($prefix_special, $ajax);
submit_event($prefix_special,'OnRemoveFilters', null, null, $ajax);
}
function filters_apply_all($prefix_special, $ajax)
{
set_form($prefix_special, $ajax);
submit_event($prefix_special,'OnApplyFilters', null, null, $ajax);
}
function RemoveTranslationLink($string, $escaped)
{
if (!isset($escaped)) $escaped = true;
if ($escaped) {
return $string.match(/&lt;a href=&quot;(.*)&quot;&gt;(.*)&lt;\/a&gt;/) ? RegExp.$2 : $string;
}
else {
return $string.match(/<a href="(.*)">(.*)<\/a>/) ? RegExp.$2 : $string;
}
}
function redirect($url)
{
window.location.href = $url;
}
function update_checkbox_options($cb_mask, $hidden_id)
{
var $kf = document.getElementById($form_name);
var $tmp = '';
for (var i = 0; i < $kf.elements.length; i++)
{
if ( $kf.elements[i].id.match($cb_mask) )
{
if ($kf.elements[i].checked) $tmp += '|'+$kf.elements[i].value;
}
}
if($tmp.length > 0) $tmp += '|';
document.getElementById($hidden_id).value = $tmp.replace(/,$/, '');
}
// related to lists operations (moving)
function move_selected($from_list, $to_list)
{
if (typeof($from_list) != 'object') $from_list = document.getElementById($from_list);
if (typeof($to_list) != 'object') $to_list = document.getElementById($to_list);
if (has_selected_options($from_list))
{
var $from_array = select_to_array($from_list);
var $to_array = select_to_array($to_list);
var $new_from = Array();
var $cur = null;
for (var $i = 0; $i < $from_array.length; $i++)
{
$cur = $from_array[$i];
if ($cur[2]) // If selected - add to To array
{
$to_array[$to_array.length] = $cur;
}
else //Else - keep in new From
{
$new_from[$new_from.length] = $cur;
}
}
$from_list = array_to_select($new_from, $from_list);
$to_list = array_to_select($to_array, $to_list);
}
else
{
alert('Please select items to perform moving!');
}
}
function select_to_array($aSelect)
{
var $an_array = new Array();
var $cur = null;
for (var $i = 0; $i < $aSelect.length; $i++)
{
$cur = $aSelect.options[$i];
$an_array[$an_array.length] = new Array($cur.text, $cur.value, $cur.selected);
}
return $an_array;
}
function array_to_select($anArray, $aSelect)
{
var $initial_length = $aSelect.length;
for (var $i = $initial_length - 1; $i >= 0; $i--)
{
$aSelect.options[$i] = null;
}
for (var $i = 0; $i < $anArray.length; $i++)
{
$cur = $anArray[$i];
$aSelect.options[$aSelect.length] = new Option($cur[0], $cur[1]);
}
}
function select_compare($a, $b)
{
if ($a[0] < $b[0])
return -1;
if ($a[0] > $b[0])
return 1;
return 0;
}
function select_to_string($aSelect)
{
var $result = '';
var $cur = null;
if (typeof($aSelect) != 'object') $aSelect = document.getElementById($aSelect);
for (var $i = 0; $i < $aSelect.length; $i++)
{
$result += $aSelect.options[$i].value + '|';
}
return $result.length ? '|' + $result : '';
}
function selected_to_string($aSelect)
{
var $result = '';
var $cur = null;
if (typeof($aSelect) != 'object') $aSelect = document.getElementById($aSelect);
for (var $i = 0; $i < $aSelect.length; $i++)
{
$cur = $aSelect.options[$i];
if ($cur.selected && $cur.value != '')
{
$result += $cur.value + '|';
}
}
return $result.length ? '|' + $result : '';
}
function string_to_selected($str, $aSelect)
{
var $cur = null;
for (var $i = 0; $i < $aSelect.length; $i++)
{
$cur = $aSelect.options[$i];
$aSelect.options[$i].selected = $str.match('\\|' + $cur.value + '\\|') ? true : false;
}
}
function set_selected($selected_options, $aSelect)
{
if (!$selected_options.length) return false;
for (var $i = 0; $i < $aSelect.length; $i++)
{
for (var $k = 0; $k < $selected_options.length; $k++)
{
if ($aSelect.options[$i].value == $selected_options[$k])
{
$aSelect.options[$i].selected = true;
}
}
}
}
function get_selected_count($theList)
{
var $count = 0;
var $cur = null;
for (var $i = 0; $i < $theList.length; $i++)
{
$cur = $theList.options[$i];
if ($cur.selected) $count++;
}
return $count;
}
function get_selected_index($aSelect, $typeIndex)
{
var $index = 0;
for (var $i = 0; $i < $aSelect.length; $i++)
{
if ($aSelect.options[$i].selected)
{
$index = $i;
if ($typeIndex == 'firstSelected') break;
}
}
return $index;
}
function has_selected_options($theList)
{
var $ret = false;
var $cur = null;
for (var $i = 0; $i < $theList.length; $i++)
{
$cur = $theList.options[$i];
if ($cur.selected) $ret = true;
}
return $ret;
}
function select_sort($aSelect)
{
if (typeof($aSelect) != 'object') $aSelect = document.getElementById($aSelect);
var $to_array = select_to_array($aSelect);
$to_array.sort(select_compare);
array_to_select($to_array, $aSelect);
}
function move_options_up($aSelect, $interval)
{
if (typeof($aSelect) != 'object') $aSelect = document.getElementById($aSelect);
if (has_selected_options($aSelect))
{
var $selected_options = Array();
var $first_selected = get_selected_index($aSelect, 'firstSelected');
for (var $i = 0; $i < $aSelect.length; $i++)
{
if ($aSelect.options[$i].selected && ($first_selected > 0) )
{
swap_options($aSelect, $i, $i - $interval);
$selected_options[$selected_options.length] = $aSelect.options[$i - $interval].value;
}
else if ($first_selected == 0)
{
//alert('Begin of list');
break;
}
}
set_selected($selected_options, $aSelect);
}
else
{
//alert('Check items from moving');
}
}
function move_options_down($aSelect, $interval)
{
if (typeof($aSelect) != 'object') $aSelect = document.getElementById($aSelect);
if (has_selected_options($aSelect))
{
var $last_selected = get_selected_index($aSelect, 'lastSelected');
var $selected_options = Array();
for (var $i = $aSelect.length - 1; $i >= 0; $i--)
{
if ($aSelect.options[$i].selected && ($aSelect.length - ($last_selected + 1) > 0))
{
swap_options($aSelect, $i, $i + $interval);
$selected_options[$selected_options.length] = $aSelect.options[$i + $interval].value;
}
else if ($last_selected + 1 == $aSelect.length)
{
//alert('End of list');
break;
}
}
set_selected($selected_options, $aSelect);
}
else
{
//alert('Check items from moving');
}
}
function swap_options($aSelect, $src_num, $dst_num)
{
var $src_html = $aSelect.options[$src_num].innerHTML;
var $dst_html = $aSelect.options[$dst_num].innerHTML;
var $src_value = $aSelect.options[$src_num].value;
var $dst_value = $aSelect.options[$dst_num].value;
var $src_option = document.createElement('OPTION');
var $dst_option = document.createElement('OPTION');
$aSelect.remove($src_num);
$aSelect.options.add($dst_option, $src_num);
$dst_option.innerText = $dst_html;
$dst_option.value = $dst_value;
$dst_option.innerHTML = $dst_html;
$aSelect.remove($dst_num);
$aSelect.options.add($src_option, $dst_num);
$src_option.innerText = $src_html;
$src_option.value = $src_value;
$src_option.innerHTML = $src_html;
}
function getXMLHTTPObject(content_type)
{
if (!isset(content_type)) content_type = 'text/plain';
var http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType(content_type);
// See note below about this line
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
return http_request;
}
function str_repeat($symbol, $count)
{
var $i = 0;
var $ret = '';
while($i < $count) {
$ret += $symbol;
$i++;
}
return $ret;
}
function getDocumentFromXML(xml)
{
if (window.ActiveXObject) {
var doc = new ActiveXObject("Microsoft.XMLDOM");
doc.async=false;
doc.loadXML(xml);
}
else {
var parser = new DOMParser();
var doc = parser.parseFromString(xml,"text/xml");
}
return doc;
}
function addEvent(el, evname, func) {
if (is.ie) {
el.attachEvent("on" + evname, func);
} else {
el.addEventListener(evname, func, true);
}
};
function set_persistant_var($var_name, $var_value, $t, $form_action)
{
set_hidden_field('field', $var_name);
set_hidden_field('value', $var_value);
submit_event('u', 'OnSetPersistantVariable', $t, $form_action);
}
/*functionremoveEvent(el, evname, func) {
if (Calendar.is_ie) {
el.detachEvent("on" + evname, func);
} else {
el.removeEventListener(evname, func, true);
}
};*/
function setCookie($Name, $Value)
{
// set cookie
if(getCookie($Name) != $Value)
{
document.cookie = $Name+'='+escape($Value)+'; path=' + $base_path + '/';
}
}
function getCookie($Name)
{
// get cookie
var $cookieString = document.cookie;
var $index = $cookieString.indexOf($Name+'=');
if($index == -1) return null;
$index = $cookieString.indexOf('=',$index)+1;
var $endstr = $cookieString.indexOf(';',$index);
if($endstr == -1) $endstr = $cookieString.length;
return unescape($cookieString.substring($index, $endstr));
}
function deleteCookie($Name)
{
// deletes cookie
if (getCookie($Name))
{
document.cookie = $Name+'=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';
}
}
function addElement($dst_element, $tag_name) {
var $new_element = document.createElement($tag_name.toUpperCase());
$dst_element.appendChild($new_element);
return $new_element;
}
Math.sum = function($array) {
var $i = 0;
var $total = 0;
while ($i < $array.length) {
$total += $array[$i];
$i++;
}
return $total;
}
Math.average = function($array) {
return Math.sum($array) / $array.length;
}
// remove spaces and underscores from a string, used for nls_menu
function rs(str)
{
return str.replace(/[ _\']+/g, '.');
}
function getFrame($name)
{
var $main_window = window;
// 1. cycle through popups to get main window
try {
// will be error, when other site is opened in parent window
while ($main_window.opener) {
$main_window = $main_window.opener;
}
}
catch (err) {
// catch Access/Permission Denied error
// alert('getFrame.Error: [' + err.description + ']');
return window;
}
var $frameset = $main_window.parent.frames;
for ($i = 0; $i < $frameset.length; $i++) {
if ($frameset[$i].name == $name) {
return $frameset[$i];
}
}
return $main_window.parent;
+ }
+
+ function ClearBrowserSelection()
+ {
+ if (window.getSelection) {
+ // removeAllRanges will be supported by Opera from v 9+, do nothing by now
+ var selection = window.getSelection();
+ if (selection.removeAllRanges) { // Mozilla & Opera 9+
+// alert('clearing FF')
+ window.getSelection().removeAllRanges();
+ }
+ } else if (document.selection && !is.opera) { // IE
+// alert('clearing IE')
+ document.selection.empty();
+ }
}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2.2.13
\ No newline at end of property
+1.2.2.14
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (revision 7070)
+++ branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (revision 7071)
@@ -1,616 +1,621 @@
<?php
class AdminTagProcessor extends kDBTagProcessor {
function SetConst($params)
{
$name = $this->SelectParam($params, 'name,const');
safeDefine($name, $params['value']);
}
/**
* Allows to execute js script after the page is fully loaded
*
* @param Array $params
* @return string
*/
function AfterScript($params)
{
$after_script = $this->Application->GetVar('after_script');
if ($after_script) {
return '<script type="text/javascript">'.$after_script.'</script>';
}
return '';
}
/**
* Returns section title with #section# keyword replaced with current section
*
* @param Array $params
* @return string
*/
function GetSectionTitle($params)
{
$params['name'] = replaceModuleSection($params['phrase']);
return $this->Application->ProcessParsedTag('m', 'Phrase', $params);
}
/**
* Returns section icon with #section# keyword replaced with current section
*
* @param Array $params
* @return string
*/
function GetSectionIcon($params)
{
return replaceModuleSection($params['icon']);
}
/**
* Allows to detect if current template is one of listed ones
*
* @param Array $params
* @return int
*/
function TemplateMatches($params)
{
$templates = explode(',' ,$params['templates']);
$t = $this->Application->GetVar('t');
return in_array($t, $templates) ? 1 : 0;
}
/**
* Save return script in cases, when old sections are opened from new sections
*
* @param Array $params
*/
function SaveReturnScript($params)
{
// admin/save_redirect.php?do=
$url = str_replace($this->Application->BaseURL(), '', $this->Application->ProcessParsedTag('m', 'Link', $params) );
$url = explode('?', $url, 2);
$url = 'save_redirect.php?'.$url[1].'&do='.$url[0];
$this->Application->StoreVar('ReturnScript', $url);
}
/**
* Redirects to correct next import step template based on import script data
*
* @param Array $params
*/
function ImportRedirect($params)
{
$import_id = $this->Application->GetVar('import_id');
if ($import_id) {
// redirect forward to step3 (import parameters coosing)
$this->Application->StoreVar('ImportScriptID', $import_id);
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'ImportScripts
WHERE is_id = '.$import_id;
$db =& $this->Application->GetADODBConnection();
$is_params = $db->GetRow($sql);
if ($is_params['is_type'] == 'db') {
$this->Application->Redirect('', null, '', 'import/step3.php');
}
elseif ($is_params['is_type'] == 'csv') {
$module = strtolower($is_params['is_Module']);
$template = $module.'/import';
$module_info = $this->Application->findModule('Name', $module);
$item_prefix = $module_info['Var'];
$pass_params = Array('m_opener' => 'd', $item_prefix.'.import_id' => 0, $item_prefix.'.import_event' => 'OnNew', 'pass' => 'm,'.$item_prefix.'.import', 'm_cat_id' => $module_info['RootCat']);
$this->Application->Redirect($template, $pass_params);
}
}
else {
// redirect back to step2 (import type choosing)
$this->Application->Redirect('', null, '', 'import/step2.php');
}
}
/**
* Returns version of module by name
*
* @param Array $params
* @return string
*/
function ModuleVersion($params)
{
return $this->Application->findModule('Name', $params['module'], 'Version');
}
/**
* Used in table form section drawing
*
* @param Array $params
* @return string
*/
function DrawTree($params)
{
static $deep_level = 0;
// when processings, then sort children by priority (key of children array)
$ret = '';
$section_name = $params['section_name'];
$params['name'] = $this->SelectParam($params, 'name,render_as,block');
$sections_helper =& $this->Application->recallObject('SectionsHelper');
$section_data =& $sections_helper->getSectionData($section_name);
$params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0;
$params['deep_level'] = $deep_level++;
$template = $section_data['url']['t'];
unset($section_data['url']['t']);
$section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']);
$ret .= $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) );
if (!isset($section_data['children'])) {
return $ret;
}
ksort($section_data['children'], SORT_NUMERIC);
foreach ($section_data['children'] as $section_name) {
$params['section_name'] = $section_name;
$ret .= $this->DrawTree($params);
$deep_level--;
}
return $ret;
}
function PrintSection($params)
{
$section_name = $params['section_name'];
if ($section_name == '#session#') {
$section_name = $this->Application->RecallVar('section');
}
$sections_helper =& $this->Application->recallObject('SectionsHelper');
$section_data =& $sections_helper->getSectionData($section_name);
$params['name'] = $this->SelectParam($params, 'name,render_as,block');
$params['section_name'] = $section_name;
$template = $section_data['url']['t'];
unset($section_data['url']['t']);
$section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']);
$ret = $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) );
return $ret;
}
/**
* Used in XML drawing for tree
*
* @param Array $params
* @return string
*/
function PrintSections($params)
{
// when processings, then sort children by priority (key of children array)
$ret = '';
$section_name = $params['section_name'];
if ($section_name == '#session#') {
$section_name = $this->Application->RecallVar('section');
}
$sections_helper =& $this->Application->recallObject('SectionsHelper');
$section_data =& $sections_helper->getSectionData($section_name);
$params['name'] = $this->SelectParam($params, 'name,render_as,block');
if (!isset($section_data['children'])) {
return '';
}
$debug_mode = $this->Application->isDebugMode(); // cache this for performance
ksort($section_data['children'], SORT_NUMERIC);
foreach ($section_data['children'] as $section_name) {
$params['section_name'] = $section_name;
$section_data =& $sections_helper->getSectionData($section_name);
if (!$debug_mode && isset($section_data['debug_only']) && $section_data['debug_only']) {
// don't show section for debug mode only without debug mode turned on
continue;
}
if (isset($section_data['tabs_only']) && $section_data['tabs_only']) {
$perm_status = false;
$folder_label = $section_data['label'];
ksort($section_data['children'], SORT_NUMERIC);
foreach ($section_data['children'] as $priority => $section_name) {
// if only tabs in this section & none of them have permission, then skip section too
$section_data =& $sections_helper->getSectionData($section_name);
if ($section_data && isset($section_data['perm_prefix'])) {
// this section uses other section permissions
$section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection');
}
-
+
$perm_status = $this->Application->CheckPermission($section_name.'.view', 1);
if ($perm_status) {
break;
}
}
if (!$perm_status) {
// no permission for all tabs -> don't display tree node either
continue;
}
$params['section_name'] = $section_name;
$section_data =& $sections_helper->getSectionData($section_name);
$section_data['label'] = $folder_label; // use folder label in tree
$section_data['is_tab'] = 1;
}
else {
if ($section_data && isset($section_data['perm_prefix'])) {
// this section uses other section permissions
$section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection');
}
-
+
if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue;
}
$params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0;
$template = $section_data['url']['t'];
unset($section_data['url']['t']);
$section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']);
$late_load = getArrayValue($section_data, 'late_load');
if ($late_load) {
$t = $late_load['t'];
unset($late_load['t']);
$section_data['late_load'] = $this->Application->HREF($t, '', $late_load);
$params['children_count'] = 99;
}
else {
$section_data['late_load'] = '';
}
$ret .= $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) );
$params['section_name'] = $section_name;
}
return preg_replace("/\r\n|\n/", '', $ret);
}
function ListSectionPermissions($params)
{
$section_name = isset($params['section_name']) ? $params['section_name'] : $this->Application->GetVar('section_name');
$sections_helper =& $this->Application->recallObject('SectionsHelper');
$section_data =& $sections_helper->getSectionData($section_name);
$block_params = array_merge_recursive2($section_data, Array('name' => $params['render_as'], 'section_name' => $section_name));
$ret = '';
foreach ($section_data['permissions'] as $perm_name) {
if (preg_match('/^advanced:(.*)/', $perm_name) != $params['type']) continue;
$block_params['perm_name'] = $perm_name;
$ret .= $this->Application->ParseBlock($block_params);
}
return $ret;
}
function ModuleInclude($params)
{
foreach ($params as $param_name => $param_value) {
$params[$param_name] = replaceModuleSection($param_value);
}
return $this->Application->ProcessParsedTag('m', 'ModuleInclude', $params);
}
function TodayDate($params)
{
return date($params['format']);
}
function TreeEditWarrning($params)
{
$ret = $this->Application->Phrase($params['label']);
$ret = str_replace(Array('&lt;', '&gt;', 'br/', 'br /', "\n", "\r"), Array('<', '>', 'br', 'br', '', ''), $ret);
if (getArrayValue($params, 'escape')) {
$ret = addslashes($ret);
}
$ret = str_replace('<br>', '\n', $ret);
return $ret;
}
/**
* Draws section tabs using block name passed
*
* @param Array $params
*/
function ListTabs($params)
{
$sections_helper =& $this->Application->recallObject('SectionsHelper');
$section_data =& $sections_helper->getSectionData($params['section_name']);
$ret = '';
$block_params = Array('name' => $params['render_as']);
ksort($section_data['children'], SORT_NUMERIC);
foreach ($section_data['children'] as $priority => $section_name) {
if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue;
$tab_data =& $sections_helper->getSectionData($section_name);
$block_params['t'] = $tab_data['url']['t'];
$block_params['title'] = $tab_data['label'];
$block_params['main_prefix'] = $section_data['SectionPrefix'];
$ret .= $this->Application->ParseBlock($block_params);
}
return $ret;
}
/**
* Returns list of module item tabs that have view permission in current category
*
* @param Array $params
*/
function ListCatalogTabs($params)
{
$ret = '';
$special = isset($params['special']) ? $params['special'] : '';
$replace_main = isset($params['replace_m']) && $params['replace_m'];
$skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array();
$block_params = Array('name' => $params['render_as']);
foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
$prefix = $module_info['Var'];
if (in_array($prefix, $skip_prefixes) || !$this->Application->prefixRegistred($prefix) || !$this->Application->getUnitOption($prefix, 'CatalogItem')) continue;
if ($prefix == 'm' && $replace_main) $prefix = 'c';
$label = $this->Application->getUnitOption($prefix, $params['title_property']);
$block_params['title'] = $label;
$block_params['prefix'] = $prefix;
$ret .= $this->Application->ParseBlock($block_params);
}
return $ret;
}
function FCKEditor($params)
{
include_once(FULL_PATH.'/core/cmseditor/fckeditor.php');
$oFCKeditor = new FCKeditor($params['name']);
$oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/';
$oFCKeditor->Width = $params['width'] ;
$oFCKeditor->Height = $params['height'] ;
$oFCKeditor->ToolbarSet = 'Advanced' ;
$oFCKeditor->Value = '' ;
$oFCKeditor->Config = Array(
//'UserFilesPath' => $pathtoroot.'kernel/user_files',
'ProjectPath' => BASE_PATH.'/',
'CustomConfigurationsPath' => $this->Application->BaseURL().'core/cmseditor/inp_fckconfig.js',
// 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(),
//'StylesXmlPath' => '../../inp_styles.xml',
// 'Debug' => 1,
'Admin' => 1,
'K4' => 1,
);
return $oFCKeditor->CreateHtml();
}
/**
* Allows to construct link for opening any type of catalog item selector
*
* @param Array $params
* @return string
*/
function SelectorLink($params)
{
$mode = 'catalog';
if (isset($params['mode'])) { // {catalog, advanced_view}
$mode = $params['mode'];
unset($params['mode']);
}
$params['t'] = 'in-portal/item_selector/item_selector_'.$mode;
$default_params = Array('no_amp' => 1, 'pass' => 'all,'.$params['prefix']);
unset($params['prefix']);
$pass_through = Array();
if (isset($params['tabs_dependant'])) { // {yes, no}
$pass_through['td'] = $params['tabs_dependant'];
unset($params['tabs_dependant']);
}
if (isset($params['selection_mode'])) { // {single, multi}
$pass_through['tm'] = $params['selection_mode'];
unset($params['selection_mode']);
}
if (isset($params['tab_prefixes'])) { // {all, none, <comma separated prefix list}
$pass_through['tp'] = $params['tab_prefixes'];
unset($params['tab_prefixes']);
}
if ($pass_through) {
// add pass_through to selector url if any
$params['pass_through'] = implode(',', array_keys($pass_through));
$params = array_merge_recursive2($params, $pass_through);
}
// user can override default parameters (except pass_through of course)
$params = array_merge_recursive2($default_params, $params);
return $this->Application->ProcessParsedTag('m', 't', $params);
}
function TimeFrame($params)
{
$w = adodb_date('w');
$m = adodb_date('m');
$y = adodb_date('Y');
//FirstDayOfWeek is 0 for Sunday and 1 for Monday
$fdow = $this->Application->ConfigValue('FirstDayOfWeek');
if ($fdow && $w == 0) $w = 7;
$today_start = adodb_mktime(0,0,0,adodb_date('m'),adodb_date('d'),$y);
$first_day_of_this_week = $today_start - ($w - $fdow)*86400;
$first_day_of_this_month = adodb_mktime(0,0,0,$m,1,$y);
$this_quater = ceil($m/3);
$this_quater_start = adodb_mktime(0,0,0,$this_quater*3-2,1,$y);
switch ($params['type']) {
case 'last_week_start':
$timestamp = $first_day_of_this_week - 86400*7;
break;
case 'last_week_end':
$timestamp = $first_day_of_this_week - 1;
break;
case 'last_month_start':
$timestamp = $m == 1 ? adodb_mktime(0,0,0,12,1,$y-1) : adodb_mktime(0,0,0,$m-1,1,$y);
break;
case 'last_month_end':
$timestamp = $first_day_of_this_month = adodb_mktime(0,0,0,$m,1,$y) - 1;
break;
case 'last_quater_start':
$timestamp = $this_quater == 1 ? adodb_mktime(0,0,0,10,1,$y-1) : adodb_mktime(0,0,0,($this_quater-1)*3-2,1,$y);
break;
case 'last_quater_end':
$timestamp = $this_quater_start - 1;
break;
case 'last_6_months_start':
$timestamp = $m <= 6 ? adodb_mktime(0,0,0,$m+6,1,$y-1) : adodb_mktime(0,0,0,$m-6,1,$y);
break;
case 'last_year_start':
$timestamp = adodb_mktime(0,0,0,1,1,$y-1);
break;
case 'last_year_end':
$timestamp = adodb_mktime(23,59,59,12,31,$y-1);
break;
}
if (isset($params['format'])) {
$format = $params['format'];
if(preg_match("/_regional_(.*)/", $format, $regs))
{
$lang =& $this->Application->recallObject('lang.current');
$format = $lang->GetDBField($regs[1]);
}
return adodb_date($format, $timestamp);
}
return $timestamp;
}
function CheckPermCache($params)
{
if ($this->Conn->GetOne('SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = \'ForcePermCacheUpdate\'')) {
$this->Application->Redirect($params['cache_update_t'], array('continue' => 1));
}
}
/**
* Checks if current protocol is SSL
*
* @param Array $params
* @return int
*/
function IsSSL($params)
{
return (PROTOCOL == 'https://')? 1 : 0;
}
function PrintColumns($params)
{
$picker_helper =& $this->Application->RecallObject('ColumnPickerHelper');
/* @var $picker_helper kColumnPickerHelper */
$main_prefix = $this->Application->GetVar('main_prefix');
$cols = $picker_helper->LoadColumns($main_prefix);
$o = '';
if (isset($params['hidden']) && $params['hidden']) {
foreach ($cols['hidden_fields'] as $col) {
$title = $this->Application->Phrase($cols['titles'][$col]);
$o .= "<option value='$col'>".$title;
}
}
else {
foreach ($cols['order'] as $col) {
if (in_array($col, $cols['hidden_fields'])) continue;
$title = $this->Application->Phrase($cols['titles'][$col]);
$o .= "<option value='$col'>".$title;
}
}
return $o;
}
/**
* Allows to set popup size (key - current template name)
*
* @param Array $params
*/
function SetPopupSize($params)
{
$width = $params['width'];
$height = $params['height'];
if ($this->Application->GetVar('ajax') == 'yes') {
// during AJAX request just output size
die($width.'x'.$height);
}
$t = $this->Application->GetVar('t');
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'PopupSizes
WHERE TemplateName = '.$this->Conn->qstr($t);
$popup_info = $this->Conn->GetRow($sql);
if (!$popup_info) {
// create new popup size record
$fields_hash = Array (
'TemplateName' => $t,
'PopupWidth' => $width,
'PopupHeight' => $height,
);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'PopupSizes');
}
elseif ($popup_info['PopupWidth'] != $width || $popup_info['PopupHeight'] != $height) {
// popup found and size in tag differs from one in db -> update in db
$fields_hash = Array (
'PopupWidth' => $width,
'PopupHeight' => $height,
);
$this->Conn->doUpdate($fields_hash, TABLE_PREFIX.'PopupSizes', 'PopupId = '.$popup_info['PopupId']);
}
}
/**
* Returns popup size (by template), if not cached, then parse template to get value
*
* @param Array $params
* @return string
*/
function GetPopupSize($params)
{
$t = $this->Application->GetVar('template_name');
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'PopupSizes
WHERE TemplateName = '.$this->Conn->qstr($t);
$popup_info = $this->Conn->GetRow($sql);
if (!$popup_info) {
$this->Application->InitParser();
$this->Application->Parser->ParseTemplate($t); // dies when SetPopupSize tag found & in ajax requrest
return '750x400'; // tag SetPopupSize not found in template -> use default size
}
return $popup_info['PopupWidth'].'x'.$popup_info['PopupHeight'];
}
function UsePopups($params)
{
return (int)$this->Application->ConfigValue('UsePopups');
}
+
+ function UseToolbarLabels($params)
+ {
+ return (int)$this->Application->ConfigValue('UseToolbarLabels');
+ }
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.27.2.12
\ No newline at end of property
+1.27.2.13
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/js/toolbar.js
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/js/toolbar.js (revision 7070)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/js/toolbar.js (revision 7071)
@@ -1,269 +1,274 @@
function ToolBarButton(title, alt, onclick, $hidden, prefix)
{
this.Title = title || '';
this.CheckTitleModule();
this.Alt = RemoveTranslationLink(alt || '');
if (this.Alt.match(/(.*)::(.*)/)) {
this.Alt = RegExp.$1;
this.Label = RegExp.$2
}
else {
this.Label = this.Alt;
}
if (typeof(onclick) == 'function') {
this.onClick = onclick;
}
else {
this.onClick = function() {
if (eval('typeof('+this.Title+')') == 'function')
eval(this.Title + '()');
}
}
this.imgObject = null;
this.Enabled = true;
this.Hidden = $hidden ? true : false;
this.ToolBar = null;
this.Prefix = prefix ? prefix : '';
}
ToolBarButton.prototype.CheckTitleModule = function()
{
if (this.Title.match(/([^:]+):(.*)$/)) {
// has module set directly
this.Title = RegExp.$2;
this.Module = RegExp.$1;
if (this.Module == 'in-portal') {
this.Module = 'kernel';
}
}
else {
// use default module
this.Module = 'core';
}
}
ToolBarButton.prototype.IconsPath = function()
{
if (typeof(img_path) == 'undefined') {
//alert('error: toolbar image path not set');
}
return img_path.replace('#MODULE#', this.Module) + 'toolbar/';
}
ToolBarButton.prototype.GetHTML = function() {
var add_style = this.ToolBar.ButtonStyle ? 'style="'+this.ToolBar.ButtonStyle+'"' : '';
var o = '<div class="toolbar-button" id="'+this.GetToolID('div')+'" '+add_style+'>'
o += '<img id="' + this.GetToolID() + '" src="' + this.IconsPath() + this.ToolBar.IconPrefix + this.Title + '.gif" title="' + this.Alt + '">';
- o += '<br/>'+this.Label;
+ if (this.ToolBar.UseLabels) o += '<br/>'+this.Label;
o += '</div>'
return o;
}
ToolBarButton.prototype.GetToolID = function(item) {
if (!item) item = 'tool'
return this.Prefix == '' ? item+'_' + this.Title : item+'_['+this.Prefix+'][' + this.Title+']'
}
ToolBarButton.prototype.Init = function() {
img = document.getElementById(this.GetToolID());
this.imgObject = img;
this.Container = document.getElementById(this.GetToolID('div')) ? document.getElementById(this.GetToolID('div')) : false;
this.Container.btn = this;
img.btn = this;
this.SetOnMouseOver();
this.SetOnMouseOut();
this.SetOnClick();
if (this.Hidden) this.Hide();
}
ToolBarButton.prototype.SetOnMouseOver = function() {
this.Container.onmouseover = function() {
this.btn.imgObject.src = this.btn.IconsPath() + this.btn.ToolBar.IconPrefix + this.btn.Title + '_f2.gif';
};
}
ToolBarButton.prototype.SetOnMouseOut = function() {
this.Container.onmouseout = function() {
this.btn.imgObject.src = this.btn.IconsPath() + this.btn.ToolBar.IconPrefix + this.btn.Title + '.gif';
};
}
ToolBarButton.prototype.SetOnClick = function() {
this.Container.onmouseout = function() {
this.btn.imgObject.src = this.btn.IconsPath() + this.btn.ToolBar.IconPrefix + this.btn.Title + '.gif';
};
this.Container.inClick = false;
if (typeof(this.onClick) != 'function') {
this.Container.onclick = function() {
if (this.inClick) return;
this.inClick = true;
if (eval('typeof('+this.btn.Title+')') == 'function')
eval(this.btn.Title + '()');
this.inClick = false;
}
}
else {
this.Container.onclick = function() {
if (this.inClick) return;
this.inClick = true;
this.btn.onClick();
this.inClick = false;
}
}
// the following lines are correct, as long as mozilla understands 'pointer', but IE 'hand',
// do not change the order of these lines!
if (is.ie6up || is.gecko) {
this.Container.style.cursor = 'pointer';
}
else {
// somehow set cursor hand for IE 5/ 5.5
// this.imgObject.style = 'cursor: hand';
}
}
ToolBarButton.prototype.Disable = function() {
if ( !this.Enabled ) return;
this.imgObject.src = this.IconsPath() + this.ToolBar.IconPrefix + this.Title + '_f3.gif';
this.Container.onmouseover = null;
this.Container.onmouseout = null;
this.Container.onclick = null;
this.Container.style.cursor = 'default';
this.Enabled = false;
}
ToolBarButton.prototype.Enable = function() {
if (this.Enabled) return;
this.imgObject.src = this.IconsPath() + this.ToolBar.IconPrefix + this.Title + '.gif';
this.SetOnMouseOver();
this.SetOnMouseOut();
this.SetOnClick();
this.Enabled = true;
}
ToolBarButton.prototype.Hide = function() {
this.Container.style.display = 'none';
this.Hidden = true;
}
ToolBarButton.prototype.Show = function() {
this.Container.style.display = '';
this.Hidden = false;
}
/* ----------- */
function ToolBarSeparator(title) //extends ToolBarButton
{
this.Title = title;
}
ToolBarSeparator.prototype = new ToolBarButton;
ToolBarSeparator.prototype.GetHTML = function() {
var add_style = this.ToolBar.ButtonStyle ? 'style="'+this.ToolBar.ButtonStyle+'"' : '';
- return '<div id="'+this.GetToolID('div')+'" class="toolbar-button" '+add_style+'><img id="' + this.GetToolID() + '" src="' + this.IconsPath() + 'tool_divider.gif"></div>';
+ var padding = this.ToolBar.UseLabels ? '7px' : '2px'
+ return '<div id="'+this.GetToolID('div')+'" class="toolbar-button" style="padding-top: '+padding+'; height: 32px;" '+add_style+'><img id="' + this.GetToolID() + '" src="' + this.IconsPath() + 'tool_divider.gif"></div>';
+
+ var add_style = this.ToolBar.ButtonStyle ? 'style="'+this.ToolBar.ButtonStyle+'"' : '';
+ return '<div id="'+this.GetToolID('div')+'" class="toolbar-button" style="border: 1px solid black; height: 100%;" '+add_style+'><img id="' + this.GetToolID() + '" src="' + this.IconsPath() + 'tool_divider.gif"></div>';
}
ToolBarSeparator.prototype.Init = function() {
img = document.getElementById(this.ToolBar.IconPrefix + this.Title);
this.Container = document.getElementById(this.GetToolID('div')) ? document.getElementById(this.GetToolID('div')) : false;
this.imgObject = img;
img.btn = this;
}
ToolBarSeparator.prototype.Enable = function() { }
ToolBarSeparator.prototype.Disable = function() { }
/* ----------- */
function ToolBarMarkup(title, html) //extends ToolBarButton
{
this.Title = title;
this.HTML = html;
}
ToolBarMarkup.prototype = new ToolBarButton;
ToolBarMarkup.prototype.GetHTML = function() {
return this.HTML;
}
ToolBarMarkup.prototype.Init = function() { }
ToolBarMarkup.prototype.Enable = function() { }
ToolBarMarkup.prototype.Disable = function() { }
/* ----------- */
function ToolBar(icon_prefix, $module)
{
this.Module = $module ? $module : 'core';
this.IconPrefix = icon_prefix ? icon_prefix : 'tool_';
this.Buttons = new Array();
+ this.UseLabels = $use_toolbarlabels ? $use_toolbarlabels : false;
}
ToolBar.prototype.AddButton = function(a_button)
{
a_button.ToolBar = this;
this.Buttons[a_button.Title] = a_button;
}
ToolBar.prototype.Render = function($container)
{
if ($container) {
$container.innerHTML = ''; // container will contain only buttons
for (var i in this.Buttons) {
btn = this.Buttons[i];
$container.innerHTML += btn.GetHTML();
}
// init all buttons after because objects are not yet created directly after assigning to innerHTML
for (var i in this.Buttons) {
btn = this.Buttons[i];
btn.Init();
}
}
else {
for (var i in this.Buttons) {
btn = this.Buttons[i];
document.write( btn.GetHTML() );
btn.Init();
}
}
}
ToolBar.prototype.EnableButton = function(button_id) {
if(this.ButtonExists(button_id)) this.Buttons[button_id].Enable();
}
ToolBar.prototype.DisableButton = function(button_id) {
if(this.ButtonExists(button_id)) this.Buttons[button_id].Disable();
}
ToolBar.prototype.HideButton = function(button_id) {
if(this.ButtonExists(button_id)) this.Buttons[button_id].Hide();
}
ToolBar.prototype.ShowButton = function(button_id) {
if(this.ButtonExists(button_id)) this.Buttons[button_id].Show();
}
ToolBar.prototype.SetEnabled = function(button_id, $enabled) {
var $ret = $enabled ? this.EnableButton(button_id) : this.DisableButton(button_id);
}
ToolBar.prototype.SetVisible = function(button_id, $visible) {
var $ret = $visible ? this.ShowButton(button_id) : this.HideButton(button_id);
}
ToolBar.prototype.GetButtonImage = function(button_id) {
if( this.ButtonExists(button_id) ) return this.Buttons[button_id].imgObject;
}
ToolBar.prototype.ButtonExists = function(button_id) {
return typeof(this.Buttons[button_id]) == 'object';
}
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/js/toolbar.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3.2.3
\ No newline at end of property
+1.3.2.4
\ No newline at end of property

Event Timeline