Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1033663
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jun 20, 4:18 PM
Size
79 KB
Mime Type
text/x-diff
Expires
Sun, Jun 22, 4:18 PM (50 m, 28 s)
Engine
blob
Format
Raw Data
Handle
668016
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.4.2/admin/editor/cmseditor/editor/dialog/fck_document.html
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/admin/editor/cmseditor/editor/dialog/fck_document.html (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/admin/editor/cmseditor/editor/dialog/fck_document.html (revision 7652)
@@ -0,0 +1,139 @@
+<html>
+ <head>
+ <title>Insert Document</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="robots" content="noindex, nofollow">
+ <script src="common/fck_dialog_common.js" type="text/javascript"></script>
+ <script src="fck_document/fck_document.js" type="text/javascript"></script>
+ <link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
+ </head>
+
+ <body scroll="no" style="OVERFLOW: hidden">
+ <div id="divInfo">
+ <table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%">
+ <tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tr>
+ <td width="100%" colspan="3">
+ <span fckLang="DlgDocURL">Document (address or file path)</span>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <input id="docUrl" style="WIDTH: 322px" type="text"">
+ </td>
+ <td> </td>
+ <td id="tdBrowse" nowrap>
+ <input id="btnBrowse" onClick="BrowseServer('docUrl');" type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" NAME="btnBrowse">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td nowrap><span fckLang="DlgDocTitle2">Document title:</span></td>
+ <td> </td>
+ <td style="WIDTH: 248px"><input id="txtTitle" style="WIDTH: 100%" type="text"></td>
+ </tr>
+ <tr>
+ <td colspan='3'><img src="images/s.gif" width="1" height="3"><br></td>
+ </tr>
+ <tr>
+ <td><span fckLang="DlgLnkViewIn">View In:</span><br /></td>
+ <td> </td>
+ <td>
+ <select id="cmbTarget" onChange="SetTarget(this.value);">
+ <option value="" fckLang="DlgLnkTargetSelf">Same Window</option>
+ <option value="_blank" fckLang="DlgLnkTargetBlank">New Window</option>
+ <option value="popup" fckLang="DlgLnkTargetPopup"><popup window></option>
+ </select>
+ </td>
+ </tr>
+ </tr>
+ </table>
+ <div id="divPopupSize" style="DISPLAY: none">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr><td colspan='7'><img src='images/s.gif' width='1' height='5'></td></tr>
+ <tr>
+ <td><span fckLang="DlgLnkPopupWidth">PopUp Width:</span></td>
+ <td> </td>
+ <td><input id="txtPopupWidth" style="WIDTH: 30" type="text" /></td>
+ <td> </td>
+ <td><span fckLang="DlgLnkPopupHeight">PopUp Height:</span></td>
+ <td> </td>
+ <td><input id="txtPopupHeight" style="WIDTH: 30" type="text" /></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+
+
+
+ <tr height="100%">
+ <td valign="top">
+ <br>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td colspan="10"> <span fckLang="DlgDocICON">ICON</span></td>
+ </tr>
+ <tr>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="Word" src="fck_document/doc.gif"> <input name="image_type" type="radio" id="doc" value="doc" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="PDF" src="fck_document/pdf.gif"> <input name="image_type" type="radio" id="pdf" value="pdf" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="Image" src="fck_document/image.gif"> <input name="image_type" type="radio" id="image" value="image" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="Excel" src="fck_document/excel.gif"> <input name="image_type" type="radio" id="excel" value="excel" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="PowerPoint" src="fck_document/ppt.gif"> <input name="image_type" type="radio" id="ppt" value="ppt" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="Audio" src="fck_document/audio.gif"> <input name="image_type" type="radio" id="audio" value="audio" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 50px"><img width="16" height="16" alt="Video" src="fck_document/video.gif"> <input name="image_type" type="radio" id="video" value="video" OnClick="SetImageType(this.value)"></td>
+ <td> </td>
+ <td align='center' style="WIDTH: 50px"><input name="image_type" type="radio" id="none" value="none" OnClick="SetImageType(this.value)"></td>
+ <td style="WIDTH: 30px"> </td>
+ </tr>
+ <tr>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocWord">Word</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocPDF">PDF</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocImage">Image</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocExcel">Excel</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocPP">PowerPoint</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocAudio">Audio</span></td>
+ <td align='center' style="WIDTH: 50px"><span fckLang="DlgDocVideo">Video</span></td>
+ <td> </td>
+ <td align='center'><span fckLang="DlgDocNone">None</span></td>
+ </tr>
+ </table>
+ <br>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align='center'><img src="images/s.gif" width="12" height="1"><br></td>
+ <td><input name="image_type" type="radio" value="other" id="other" OnClick="SetImageType(this.value)"></td>
+ <td align='center' style="WIDTH: 25px"><span fckLang="DlgDocOther">Other</span></td>
+ <td> </td>
+ <td align='center'><input id="otherUrl" style="WIDTH: 248px" type="text"></td>
+ <td> </td>
+ <td id="tdBrowse" nowrap>
+ <input id="btnBrowse2" onClick="BrowseServer('otherUrl'); " type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" NAME="btnBrowse">
+ </td>
+
+ </tr>
+ </table>
+ <br>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><img src="images/s.gif" width="14" height="1"><br></td>
+ <td><input id="display_size" type="checkbox"></td>
+ <td> </td>
+ <td><span fckLang="DlgDocDisplayFSize">Display File Size</span></td>
+ </tr>
+ </table>
+
+
+ </td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
Property changes on: branches/unlabeled/unlabeled-1.4.2/admin/editor/cmseditor/editor/dialog/fck_document.html
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/kernel/constants.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/kernel/constants.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/kernel/constants.php (revision 7652)
@@ -0,0 +1,48 @@
+<?php
+
+ // kDBList filter types (then, types are divided into classes)
+ define('HAVING_FILTER', 1);
+ define('WHERE_FILTER', 2);
+ define('AGGREGATE_FILTER', 3);
+
+ // kDBList filter classes
+ define('FLT_SYSTEM', 1); // System Having/Where filter [AND]
+ define('FLT_NORMAL', 2); // User Having/Where filter [OR]
+ define('FLT_SEARCH', 3); // User "Search" Having/Where filter [OR]
+ define('FLT_VIEW', 4); // User "View Menu" Having/Where filter [AND]
+ define('FLT_CUSTOM', 5); // Custom fields (above) grid columns [AND]
+
+ // kMultipleFilter types
+ define('FLT_TYPE_AND', 'AND');
+ define('FLT_TYPE_OR', 'OR');
+
+ // item statuses
+ safeDefine('STATUS_DISABLED', 0);
+ safeDefine('STATUS_ACTIVE', 1);
+ safeDefine('STATUS_PENDING', 2);
+
+ // sections
+ define('stTREE', 1);
+ define('stTAB', 2);
+
+ // event statuses
+ define('erSUCCESS', 0); // event finished working succsessfully
+ define('erFAIL', -1); // event finished working, but result is unsuccsessfull
+ define('erFATAL', -2); // event experienced FATAL error - no hooks should continue!
+ define('erPERM_FAIL', -3); // event failed on internal permission checking (user has not permission)
+
+ // permission types
+ define('ptCATEGORY', 0);
+ define('ptSYSTEM', 1);
+
+ define('EDIT_MARK', '&|edit|&'); // replace this sequence inside filters to SID[_main_wid]
+
+ $application =& kApplication::Instance();
+ $spacer_url = $application->BaseURL().'core/admin_templates/img/spacer.gif';
+ define('SPACER_URL', $spacer_url);
+
+ if (!$application->IsAdmin()) {
+ // don't show debugger buttons on front (if not overrided in "debug.php")
+ safeDefine('DBG_TOOLBAR_BUTTONS', 0);
+ }
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/kernel/constants.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php (revision 7652)
@@ -0,0 +1,88 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'perm',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'Clones' => Array(
+ 'c-perm' => Array(
+ 'Constrain' => 'Type = 0', // non-system
+ 'ParentPrefix' => 'c',
+ 'ForeignKey' => 'CatId',
+ 'ParentTableKey' => 'CategoryId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCategorySavePermissions',
+ ),
+ ),
+ ),
+
+ 'g-perm' => Array(
+ 'Constrain' => 'Type = 1', // system
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnGroupSavePermissions',
+ ),
+ ),
+ ),
+ ),
+
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+
+ 'IDField' => 'PermissionId',
+
+ 'StatusField' => Array('PermissionValue'),
+
+ 'TitleField' => 'Permission',
+
+ 'TableName' => TABLE_PREFIX.'Permissions',
+
+ 'AutoDelete' => false,
+ 'AutoClone' => false,
+
+ 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+ 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Permission' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'PermissionId' => Array(),
+ 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'GroupId' => Array('type' => 'int','default' => '0'),
+ 'PermissionValue' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'CatId' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/permissions/permissions_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/helpers_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/helpers_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/helpers_config.php (revision 7652)
@@ -0,0 +1,21 @@
+<?php
+
+ $config = Array(
+ 'Prefix' => 'helpers',
+ 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'RegisterClasses' => Array(
+ Array('pseudo'=>'kMultiLanguageHelper','class'=>'kMultiLanguageHelper','file'=>'multilanguage.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'SearchHelper','class'=>'kSearchHelper','file'=>'search_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'SectionsHelper','class'=>'kSectionsHelper','file'=>'sections_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'PermissionsHelper','class'=>'kPermissionsHelper','file'=>'permissions_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'ModulesHelper','class'=>'kModulesHelper','file'=>'modules.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'ModRewriteHelper','class'=>'kModRewriteHelper','file'=>'mod_rewrite_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'RecursiveHelper','class'=>'kRecursiveHelper','file'=>'recursive_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'FilenamesHelper','class'=>'kFilenamesHelper','file'=>'filenames_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'ClipboardHelper','class'=>'kClipboardHelper','file'=>'clipboard_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'ColumnPickerHelper','class'=>'kColumnPickerHelper','file'=>'col_picker_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'ThemesHelper','class'=>'kThemesHelper','file'=>'themes_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo'=>'CaptchaHelper','class'=>'kCaptchaHelper','file'=>'captcha_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ ),
+ );
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/helpers_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php (revision 7652)
@@ -0,0 +1,77 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'ug',
+ 'Clones' => Array(
+ 'g-ug' => Array(
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+ ),
+
+ 'u-ug' => Array(
+ 'ParentPrefix' => 'u',
+ 'ForeignKey' => 'PortalUserId',
+ 'ParentTableKey' => 'PortalUserId',
+ ),
+ ),
+
+ 'ItemClass' => Array('class'=>'UserGroups_DBItem','file'=>'user_groups_dbitem.php','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'UserGroupsEventHandler','file'=>'user_groups_eh.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+
+ 'IDField' => 'GroupId',
+
+ 'TableName' => TABLE_PREFIX.'UserGroup',
+
+ 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId'),
+
+ 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId'),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'CalculatedFields' => Array (
+ '' => Array(
+ 'GroupName' => 'g.Name',
+ ),
+ ),
+
+ 'Fields' => Array(
+ 'PortalUserId' => Array('type' => 'int'),
+ 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
+ 'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
+ 'PrimaryGroup' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'ExpirationReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
+
+ 'VirtualFields' => Array (
+ 'GroupName' => Array('type' => 'string'),
+ ),
+
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array ('default' => 'icon16_group.gif'),
+ 'Fields' => Array(
+ 'GroupId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'),
+ 'GroupName' => Array ('title'=>'la_col_GroupName'),
+ 'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
+ 'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td'),
+ ),
+ ),
+ ),
+
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/user_groups/user_groups_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/style.css
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/style.css (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/style.css (revision 7652)
@@ -0,0 +1,635 @@
+/* --- In-Portal --- */
+
+html {
+ height: 100%;
+}
+
+.head_version {
+ font-family: verdana, arial;
+ font-size: 10px;
+ font-weight: normal;
+ color: white;
+ padding-right: 5px;
+ text-decoration: none;
+}
+
+body {
+ font-family: Verdana, Arial, Helvetica, Sans-serif;
+ font-size: 12px;
+ color: #000000;
+ scrollbar-3dlight-color: #333333;
+ scrollbar-arrow-color: #ffffff;
+ scrollbar-track-color: #88d2f8;
+ scrollbar-darkshadow-color: #333333;
+ scrollbar-highlight-color: #009ffd;
+ scrollbar-shadow-color: #009ffd;
+ scrollbar-face-color: #009ffd;
+ overflow-x: auto; overflow-y: auto;
+ height: 100%;
+ margin: 0px 0px 0px 8px
+}
+
+A {
+ color: #006699;
+ text-decoration: none;
+}
+
+A:hover {
+ color: #009ff0;
+ text-decoration: none;
+}
+
+TD {
+ font-family: verdana,helvetica;
+ font-size: 10pt;
+ text-decoration: none;
+}
+
+form {
+ display: inline;
+}
+
+.text {
+ font-family: verdana, arial;
+ font-size: 12px;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.tablenav {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ color: #FFFFFF;
+
+ text-decoration: none;
+ background-color: #73C4F5;
+ background: url(../img/tabnav_back.gif) repeat-x;
+}
+
+
+.header_left_bg {
+ background: url(../img/tabnav_left.gif) no-repeat;
+}
+
+.tablenav_link {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+/*.tablenav_link:hover {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ color: #ffcc00;
+ text-decoration: none;
+}*/
+
+.tableborder {
+ font-family: arial, helvetica, sans-serif;
+ font-size: 10pt;
+ border: 1px solid #000000;
+ border-top-width: 0px;
+ border-collapse: collapse;
+}
+
+.tableborder_full, .tableborder_full_kernel {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+ border: 1px solid #000000;
+ border-collapse: collapse;
+}
+
+.tableborder_full {
+ border-bottom-width: 0px;
+}
+
+.search-cell {
+ padding-right: 0px;
+ white-space: nowrap;
+}
+
+
+.button {
+ font-family: arial, verdana;
+ font-size: 12px;
+ font-weight: normal;
+ color: #000000;
+ background: url(../img/button_back.gif) #f9eeae repeat-x;
+ text-decoration: none;
+}
+
+.button-disabled {
+ font-family: arial, verdana;
+ font-size: 12px;
+ font-weight: normal;
+ color: #676767;
+ background: url(../img/button_back_disabled.gif) #f9eeae repeat-x;
+ text-decoration: none;
+}
+
+.hint_red {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-style: normal;
+ color: #FF0000;
+ /* background-color: #F0F1EB; */
+}
+
+.tree_head {
+ font-family: verdana, arial;
+ font-size: 10px;
+ font-weight: bold;
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+.admintitle {
+ font-family: verdana, arial;
+ font-size: 20px;
+ font-weight: bold;
+ color: #009FF0;
+ text-decoration: none;
+}
+
+.table_border_notop, .table_border_nobottom {
+ background-color: #F0F1EB;
+ border: 1px solid #000000;
+ border-collapse: collapse;
+}
+
+.table_border_notop {
+ border-top-width: 0px;
+}
+
+.table_border_nobottom {
+ border-bottom-width: 0px;
+}
+
+.pagination_bar {
+ background-color: #D7D7D7;
+ border: 1px solid #000000;
+ border-top-width: 0px;
+ border-collapse: collapse;
+}
+
+.totals-row td {
+ background-color: #D7D7D7;
+ border-bottom: 1px solid #000000;
+ border-top: 1px solid #000000;
+ font-weight: bold;
+}
+
+
+/* Categories */
+
+.priority {
+ color: #FF0000;
+ padding-left: 1px;
+ padding-right: 1px;
+ font-size: 11px;
+}
+
+.cat_no, .cat_desc, .cat_new, .cat_pick, .cats_stats {
+ font-family: arial, verdana, sans-serif;
+}
+
+.cat_no {
+ font-size: 10px;
+ color: #707070;
+}
+
+.cat_desc {
+ font-size: 9pt;
+ color: #000000;
+}
+
+.cat_new {
+ font-size: 12px;
+ vertical-align: super;
+ color: blue;
+}
+
+.cat_pick {
+ font-size: 12px;
+ vertical-align: super;
+ color: #009900;
+}
+
+.cats_stats {
+ font-size: 11px;
+ color: #707070;
+}
+
+/* Links */
+
+.link, .link:hover, .link_desc, .link_detail {
+ font-family: arial, helvetica, sans-serif;
+}
+
+.link {
+ font-size: 9pt;
+ color: #1F569A;
+}
+
+.link:hover {
+ font-size: 9pt;
+ color: #009FF0;
+}
+
+.link_desc {
+ font-size: 9pt;
+ color: #000000;
+}
+
+.link_detail {
+ font-size: 11px;
+ color: #707070;
+}
+
+.link_rate, .link_review, .link_modify, .link_div, .link_new, .link_top, .link_pop, .link_pick {
+ font-family: arial, helvetica, sans-serif;
+ font-size: 12px;
+}
+
+.link_rate, .link_review, .link_modify, .link_div {
+ text-decoration: none;
+}
+
+.link_rate { color: #006600; }
+.link_review { color: #A27900; }
+.link_modify { color: #800000; }
+.link_div { color: #000000; }
+
+.link_new, .link_top, .link_pop, .link_pick {
+ vertical-align: super;
+}
+
+.link_new { color: #0000FF; }
+.link_top { color: #FF0000; }
+.link_pop { color: FFA500; }
+.link_pick { color: #009900; }
+
+/* ToolBar */
+
+.divider {
+ BACKGROUND-COLOR: #999999
+}
+
+.toolbar {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+ border: 1px solid #000000;
+ border-width: 0 1 1 1;
+ background-color: #F0F1EB;
+ border-collapse: collapse;
+}
+
+.current_page {
+ font-family: verdana;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: #C4C4C4;
+ padding-left: 1px;
+ padding-right: 1px;
+}
+
+.nav_url {
+ font-family: verdana;
+ font-size: 12px;
+ font-weight: bold;
+ color: #1F569A;
+}
+
+.nav_arrow {
+ font-family: verdana;
+ font-size: 12px;
+ font-weight: normal;
+ color: #1F569A;
+ padding-left: 3px;
+ padding-right: 3px;
+}
+
+.nav_current_item {
+ font-family: verdana;
+ font-size: 12px;
+ font-weight: bold;
+ color: #666666;
+}
+
+/* Edit forms */
+
+.hint {
+ font-family: arial, helvetica, sans-serif;
+ font-size: 12px;
+ font-style: normal;
+ color: #666666;
+}
+
+.table_color1, .table_color2 {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: normal;
+ color: #000000;
+ text-decoration: none;
+}
+
+.table_color1 { background-color: #F6F6F6; }
+.table_color2 { background-color: #EBEBEB; }
+
+
+.table_white, .table_white_selected {
+ font-family: verdana, arial;
+ font-weight: normal;
+ font-size: 14px;
+ color: #000000;
+ text-decoration: none;
+ padding-top: 0px;
+ padding-bottom: 0px;
+}
+
+.table_white {
+ background-color: #FFFFFF;
+}
+
+.table_white_selected {
+ background-color: #C6D6EF;
+}
+
+.subsectiontitle {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ background-color: #999999;
+ text-decoration: none;
+
+ color: #FFFFFF;
+
+}
+
+/*.subsectiontitle:hover {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ background-color: #999999;
+ text-decoration: none;
+
+ color: #FFCC00;
+}*/
+
+.error {
+ font-family: arial, helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 9pt;
+ color: #FF0000;
+}
+
+/* Tabs */
+
+.tab_border {
+ border: 1px solid #000000;
+ border-width: 1 0 0 0;
+}
+
+.tab, .tab:hover {
+ font-family: verdana, arial, helvetica;
+ font-size: 12px;
+ font-weight: bold;
+ color: #000000;
+ text-decoration: none;
+}
+
+.tab2, .tab2:hover {
+ font-family: verdana, arial, helvetica;
+ font-size: 12px;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+.tab2 { color: #FFFFFF; }
+.tab2:hover { color: #000000; }
+
+/* Item DIVS */
+
+.selected_div { background-color: #C6D6EF; }
+.notselected_div { background-color: #FFFFFF; }
+
+/* Item tabs */
+
+
+.itemtab_active {
+ background: url("../img/itemtabs/tab_active.gif") #eee repeat-x;
+}
+
+.itemtab_inactive {
+ background: url("../img/itemtabs/tab_inactive.gif") #F9EEAE repeat-x;
+}
+
+
+/* Grids */
+
+.columntitle, .columntitle:hover {
+ font-family: verdana, arial;
+ font-size: 14px;
+ font-weight: bold;
+ background-color: #999999;
+ text-decoration: none;
+}
+
+.columntitle { color: #FFFFFF; }
+.columntitle:hover { color: #FFCC00; }
+
+.columntitle_small, .columntitle_small:hover {
+ font-family: verdana, arial;
+ font-size: 12px;
+ font-weight: bold;
+ background-color: #999999;
+ text-decoration: none;
+}
+
+.columntitle_small { color: #FFFFFF; }
+.columntitle_small:hover { color: #FFCC00; }
+
+/* ----------------------------- */
+
+.section_header_bg {
+ background: url(../img/logo_bg.gif) no-repeat top right;
+}
+
+.small {
+ font-size: 9px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+/* order preview & preview_print styles */
+
+.order_print_defaults TD,
+.order_preview_header,
+.order_preview_header TD,
+.order_print_preview_header TD,
+.order_preview_field_name,
+.order-totals-name,
+.arial2r,
+.orders_print_flat_table TD {
+ font-family: Arial;
+ font-size: 10pt;
+}
+
+.order_preview_header, .order_preview_header TD, .order_print_preview_header TD {
+ background-color: #C9E9FE;
+ font-weight: bold;
+}
+
+.order_print_preview_header TD {
+ background-color: #FFFFFF;
+}
+
+.order_preview_field_name {
+ font-weight: bold;
+ padding: 2px 4px 2px 4px;
+}
+
+.order-totals-name {
+ font-style: normal;
+}
+
+.border1 {
+ border: 1px solid #111111;
+}
+
+.arial2r {
+ color: #602830;
+ font-weight: bold;
+}
+
+.orders_flat_table, .orders_print_flat_table {
+ border-collapse: collapse;
+ margin: 5px;
+}
+
+.orders_flat_table TD {
+ padding: 2px 5px 2px 5px;
+ border: 1px solid #444444;
+}
+
+.orders_print_flat_table TD {
+ border: 1px solid #000000;
+ padding: 2px 5px 2px 5px;
+}
+
+.help_box {
+ padding: 5px 10px 5px 10px;
+}
+
+.progress_bar
+{
+ background: url(../img/progress_bar_segment.gif);
+}
+
+.grid_id_cell TD {
+ padding-right: 2px;
+}
+
+/*.transparent {
+ filter: alpha(opacity=50);
+ -moz-opacity: .5;
+ opacity: .5;
+}*/
+
+.none_transparent {
+
+}
+
+.subitem_icon {
+ vertical-align: top;
+ padding-top: 0px;
+ text-align: center;
+ width: 28px;
+}
+
+.subitem_description {
+ vertical-align: middle;
+}
+
+.dLink, .dLink:hover {
+ display: block;
+ margin-bottom: 5px;
+ font-family: Verdana;
+ font-size: 13px;
+ font-weight: bold;
+ color: #2C73CB;
+}
+
+.dLink {
+ text-decoration: none;
+}
+
+.dLink:hover {
+ text-decoration: underline;
+}
+
+a.config-header, a.config-header:hover {
+ color: #FFFFFF;
+ font-size: 11px;
+}
+
+.catalog-tab-left {
+ background: url(../img/itemtabs/tab_left.gif) top left no-repeat;
+}
+
+.catalog-tab-middle {
+ background: url(../img/itemtabs/tab_middle.gif) top left repeat-x;
+}
+
+.catalog-tab-right {
+ background: url(../img/itemtabs/tab_right.gif) top right no-repeat;
+}
+
+catalog-tab-separator td {
+ background: #FFFFFF;
+}
+
+.catalog-tab-selected td {
+ background-color: #E0E0DA;
+ cursor: default;
+}
+
+.catalog-tab-unselected td, .catalog-tab-unselected td span {
+ background-color: #F0F1EB;
+ cursor: pointer;
+}
+
+.catalog-tab {
+ display: none;
+ width: 100%;
+}
+
+.progress-text {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ color: #414141;
+}
+
+.flat-input {
+ border: 1px solid grey;
+}
+
+
+/* Toolbar */
+
+.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {
+ float: left;
+ clear: none !important;
+ border: none;
+ text-align: center;
+ font-size: 10px;
+ padding: 2px 2px 2px 2px;
+ vertical-align: middle;
+}
+
+.toolbar-button-over {
+
+}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/style.css
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/js/script.js
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/admin_templates/js/script.js (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/admin_templates/js/script.js (revision 7652)
@@ -0,0 +1,1320 @@
+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');
+ event_bak = get_hidden_field('events[' + $prefix_special + ']')
+ if (!event_bak) event_bak = '';
+ submit_event($prefix_special, $event, $t);
+ opener_action($prev_opener); // restore opener in parent window
+ set_hidden_field('events[' + $prefix_special + ']', event_bak); // restore event
+ set_hidden_field($prefix_special+'_mode', mode_bak)
+}
+
+function openSelector($prefix, $url, $dst_field, $window_size, $event)
+{
+ // if url has additional params - store it and make hidden fields from it (later, below)
+ var $additional = [];
+ if ($url.match('(.*?)&(.*)')) {
+ $url = RegExp.$1;
+ var tmp = RegExp.$2;
+ var pairs = tmp.split('&');
+
+ for (var i in pairs) {
+ var data = pairs[i].split('=');
+ $additional[data[0]] = data[1];
+ }
+ }
+
+ // 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);
+
+ for (var i in $additional)
+ {
+ set_hidden_field(i, $additional[i]);
+ }
+
+ open_popup($prefix, $event, $t);
+
+ // restore form action back
+ processHooks('openSelector', hAFTER);
+ $kf.action = $prev_action;
+}
+
+function translate_phrase($label, $template) {
+ set_hidden_field('phrases_label', $label);
+ open_popup('phrases', 'OnNew', $template);
+}
+
+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);
+ }
+}
+
+var mode_bak = null;
+function std_edit_item(prefix_special, edit_template)
+{
+ mode_bak = get_hidden_field(prefix_special+'_mode');
+ 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.replace(/<a href="(.*?)">(.*?)<\/a>/g, '$2');
+ }
+
+ return $string.replace(/<a href="(.*?)">(.*?)<\/a>/g, '$2');
+}
+
+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();
+ }
+ }
+
+ function reset_form(prefix, event, msg)
+ {
+ if (confirm(RemoveTranslationLink(msg, true))) {
+ submit_event(prefix, event)
+ }
+ }
+
+ function cancel_edit(prefix, cancel_ev, save_ev, msg)
+ {
+ if (confirm(RemoveTranslationLink(msg, true))) {
+ submit_event(prefix, save_ev)
+ }
+ else {
+ submit_event(prefix, cancel_ev)
+ }
+ }
+
+
+
+function execJS(node)
+{
+ var bSaf = (navigator.userAgent.indexOf('Safari') != -1);
+ var bOpera = (navigator.userAgent.indexOf('Opera') != -1);
+ var bMoz = (navigator.appName == 'Netscape');
+
+ if (!node) return;
+
+ /* IE wants it uppercase */
+ var st = node.getElementsByTagName('SCRIPT');
+ var strExec;
+
+ for(var i=0;i<st.length; i++)
+ {
+ if (bSaf) {
+ strExec = st[i].innerHTML;
+ st[i].innerHTML = "";
+ } else if (bOpera) {
+ strExec = st[i].text;
+ st[i].text = "";
+ } else if (bMoz) {
+ strExec = st[i].textContent;
+ st[i].textContent = "";
+ } else {
+ strExec = st[i].text;
+ st[i].text = "";
+ }
+
+ try {
+ var x = document.createElement("script");
+ x.type = "text/javascript";
+
+ /* In IE we must use .text! */
+ if ((bSaf) || (bOpera) || (bMoz))
+ x.innerHTML = strExec;
+ else x.text = strExec;
+
+ document.getElementsByTagName("head")[0].appendChild(x);
+ } catch(e) {
+ alert(e);
+ }
+ }
+};
+
+function NumberFormatter() {}
+
+NumberFormatter.ThousandsSep = '\'';
+NumberFormatter.DecimalSep = '.';
+
+NumberFormatter.Parse = function(num)
+{
+ return parseFloat( num.toString().replace(this.ThousandsSep, '').replace(this.DecimalSep, '.') );
+}
+
+NumberFormatter.Format = function(num)
+{
+ num += '';
+ x = num.split('.');
+ x1 = x[0];
+ x2 = x.length > 1 ? this.DecimalSep + x[1] : '';
+ var rgx = /(\d+)(\d{3})/;
+ while (rgx.test(x1)) {
+ x1 = x1.replace(rgx, '$1' + this.ThousandsSep + '$2');
+ }
+ return x1 + x2;
+}
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/js/script.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql (revision 7652)
@@ -0,0 +1,423 @@
+CREATE TABLE PermissionConfig (
+ PermissionConfigId int(11) NOT NULL auto_increment,
+ PermissionName varchar(30) NOT NULL default '',
+ Description varchar(255) NOT NULL default '',
+ ErrorMessage varchar(255) NOT NULL default '',
+ ModuleId varchar(20) NOT NULL default '0',
+ PRIMARY KEY (PermissionConfigId),
+ KEY PermissionName (PermissionName)
+);
+
+CREATE TABLE Permissions (
+ PermissionId int(11) NOT NULL auto_increment,
+ Permission varchar(255) NOT NULL default '',
+ GroupId int(11) default '0',
+ PermissionValue int(11) NOT NULL default '0',
+ `Type` tinyint(4) NOT NULL default '0',
+ CatId int(11) NOT NULL default '0',
+ PRIMARY KEY (PermissionId),
+ UNIQUE KEY PermIndex (Permission,GroupId,CatId,`Type`)
+);
+
+CREATE TABLE CustomField (
+ CustomFieldId int(11) NOT NULL auto_increment,
+ Type int(11) NOT NULL default '0',
+ FieldName varchar(255) NOT NULL default '',
+ FieldLabel varchar(40) default NULL,
+ Heading varchar(60) default NULL,
+ Prompt varchar(60) default NULL,
+ ElementType varchar(50) NOT NULL default '',
+ ValueList varchar(255) default NULL,
+ DisplayOrder int(11) NOT NULL default '0',
+ OnGeneralTab tinyint(4) NOT NULL default '0',
+ IsSystem tinyint(3) unsigned NOT NULL default '0',
+ PRIMARY KEY (CustomFieldId),
+ KEY Type (Type)
+);
+
+CREATE TABLE ConfigurationAdmin (
+ VariableName varchar(80) NOT NULL default '',
+ heading varchar(255) default NULL,
+ prompt varchar(255) default NULL,
+ element_type varchar(20) NOT NULL default '',
+ validation varchar(255) default NULL,
+ ValueList text default NULL,
+ DisplayOrder double NOT NULL default '0',
+ GroupDisplayOrder double NOT NULL default '0',
+ Install int(11) NOT NULL default '1',
+ PRIMARY KEY (VariableName)
+);
+
+CREATE TABLE ConfigurationValues (
+ VariableId int(11) NOT NULL auto_increment,
+ VariableName varchar(255) NOT NULL default '',
+ VariableValue varchar(255) default NULL,
+ ModuleOwner varchar(20) default 'In-Portal',
+ Section varchar(255) NOT NULL default '',
+ PRIMARY KEY (VariableId),
+ UNIQUE KEY VariableName (VariableName)
+);
+
+CREATE TABLE EmailMessage (
+ EmailMessageId int(10) NOT NULL auto_increment,
+ Template longtext,
+ MessageType enum('html','text') NOT NULL default 'text',
+ LanguageId int(11) NOT NULL default '0',
+ EventId int(11) NOT NULL default '0',
+ Subject text,
+ PRIMARY KEY (EmailMessageId)
+);
+
+CREATE TABLE EmailQueue (
+ Subject text NOT NULL,
+ toaddr text NOT NULL,
+ fromaddr text NOT NULL,
+ message blob,
+ headers blob,
+ queued timestamp NOT NULL
+);
+
+CREATE TABLE EmailSubscribers (
+ EmailMessageId int(11) NOT NULL default '0',
+ PortalUserId int(11) NOT NULL default '0'
+);
+
+CREATE TABLE Events (
+ EventId int(11) NOT NULL auto_increment,
+ Event varchar(40) NOT NULL default '',
+ Enabled int(11) NOT NULL default '1',
+ FromUserId int(11) NOT NULL default '0',
+ Module varchar(40) NOT NULL default '',
+ Description varchar(255) NOT NULL default '',
+ Type int(11) NOT NULL default '0',
+ PRIMARY KEY (EventId)
+);
+
+CREATE TABLE IdGenerator (
+ lastid int(11) default NULL
+);
+
+CREATE TABLE Language (
+ LanguageId int(11) NOT NULL auto_increment,
+ PackName varchar(40) NOT NULL default '',
+ LocalName varchar(40) NOT NULL default '',
+ Enabled int(11) NOT NULL default '0',
+ PrimaryLang int(11) NOT NULL default '0',
+ IconURL varchar(255) default NULL,
+ DateFormat varchar(50) NOT NULL default '',
+ TimeFormat varchar(50) NOT NULL default '',
+ InputDateFormat varchar(50) NOT NULL default '',
+ InputTimeFormat varchar(50) NOT NULL default '',
+ DecimalPoint char(2) NOT NULL default '.',
+ ThousandSep tinytext NULL,
+ Charset varchar(20) NOT NULL default '',
+ UnitSystem tinyint(4) NOT NULL default '1',
+ PRIMARY KEY (LanguageId)
+);
+
+CREATE TABLE Modules (
+ Name varchar(255) NOT NULL default '',
+ Path varchar(255) NOT NULL default '',
+ Var varchar(10) NOT NULL default '',
+ Version varchar(10) NOT NULL default '',
+ Loaded tinyint(4) NOT NULL default '1',
+ LoadOrder tinyint(4) NOT NULL default '0',
+ TemplatePath varchar(255) NOT NULL default '',
+ RootCat int(11) NOT NULL default '0',
+ BuildDate double NOT NULL default '0',
+ PRIMARY KEY (Name)
+);
+
+CREATE TABLE PersistantSessionData (
+ PortalUserId int(11) NOT NULL default '0',
+ VariableName varchar(255) NOT NULL default '',
+ VariableValue text NOT NULL,
+ PRIMARY KEY (PortalUserId,VariableName),
+ KEY UserId (PortalUserId),
+ KEY VariableName (VariableName)
+);
+
+CREATE TABLE Phrase (
+ Phrase varchar(255) NOT NULL default '',
+ Translation text NOT NULL default '',
+ PhraseType int(11) NOT NULL default '0',
+ PhraseId int(11) NOT NULL auto_increment,
+ LanguageId int(11) NOT NULL default '0',
+ LastChanged int(10) unsigned NOT NULL default '0',
+ LastChangeIP varchar(15) NOT NULL default '',
+ Module varchar(30) NOT NULL default '',
+ PRIMARY KEY (PhraseId),
+ KEY LanguageId (LanguageId),
+ INDEX Phrase_Index (Phrase)
+);
+
+CREATE TABLE PhraseCache (
+ Template varchar(40) NOT NULL default '',
+ PhraseList text NOT NULL,
+ CacheDate int(11) NOT NULL default '0',
+ ThemeId int(11) NOT NULL default '0',
+ StylesheetId int(10) unsigned NOT NULL default '0',
+ ConfigVariables text,
+ PRIMARY KEY (Template)
+);
+
+CREATE TABLE PortalGroup (
+ GroupId int(11) NOT NULL auto_increment,
+ Name varchar(255) NOT NULL default '',
+ Description varchar(255) default NULL,
+ CreatedOn double NOT NULL default '0',
+ System tinyint(4) NOT NULL default '0',
+ Personal tinyint(4) NOT NULL default '0',
+ Enabled tinyint(4) NOT NULL default '1',
+ ResourceId int(11) NOT NULL default '0',
+ PRIMARY KEY (GroupId),
+ UNIQUE KEY Name (Name),
+ UNIQUE KEY ResourceId (ResourceId),
+ KEY Personal (Personal),
+ KEY Enabled (Enabled)
+);
+
+CREATE TABLE PortalUser (
+ PortalUserId int(11) NOT NULL auto_increment,
+ Login varchar(255) default NULL,
+ `Password` varchar(255) default NULL,
+ FirstName varchar(255) default NULL,
+ LastName varchar(255) default NULL,
+ Company varchar(255) NOT NULL default '',
+ Email varchar(255) NOT NULL default '',
+ CreatedOn double NOT NULL default '0',
+ Phone varchar(20) default NULL,
+ Fax varchar(255) NOT NULL default '',
+ Street varchar(255) default NULL,
+ Street2 varchar(255) NOT NULL default '',
+ City varchar(20) default NULL,
+ State varchar(20) NOT NULL default '',
+ Zip varchar(20) default NULL,
+ Country varchar(20) NOT NULL default '',
+ ResourceId int(11) NOT NULL default '0',
+ `Status` tinyint(4) NOT NULL default '2',
+ Modified int(11) NOT NULL default '0',
+ dob double NOT NULL default '0',
+ tz int(11) default NULL,
+ ip varchar(20) default NULL,
+ IsBanned tinyint(1) NOT NULL default '0',
+ PassResetTime bigint(20) default NULL,
+ PwResetConfirm varchar(255) default NULL,
+ PwRequestTime bigint(25) default NULL,
+ MinPwResetDelay int(11) NOT NULL default '1800',
+ PRIMARY KEY (PortalUserId),
+ UNIQUE KEY ResourceId (ResourceId),
+ UNIQUE KEY Login (Login),
+ KEY CreatedOn (CreatedOn)
+);
+
+CREATE TABLE PortalUserCustomData (
+ CustomDataId int(11) NOT NULL auto_increment,
+ ResourceId int(10) unsigned NOT NULL default '0',
+ KEY ResourceId (ResourceId),
+ PRIMARY KEY (CustomDataId)
+);
+
+CREATE TABLE SessionData (
+ SessionKey varchar(50) NOT NULL default '',
+ VariableName varchar(255) NOT NULL default '',
+ VariableValue text NOT NULL,
+ PRIMARY KEY (SessionKey,VariableName),
+ KEY SessionKey (SessionKey),
+ KEY VariableName (VariableName)
+);
+
+CREATE TABLE Theme (
+ ThemeId int(11) NOT NULL auto_increment,
+ Name varchar(40) NOT NULL default '',
+ Enabled int(11) NOT NULL default '1',
+ Description varchar(255) default NULL,
+ PrimaryTheme int(11) NOT NULL default '0',
+ CacheTimeout int(11) NOT NULL default '0',
+ StylesheetId int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (ThemeId)
+);
+
+CREATE TABLE ThemeFiles (
+ FileId int(11) NOT NULL auto_increment,
+ ThemeId int(11) NOT NULL default '0',
+ FileName varchar(255) NOT NULL default '',
+ FilePath varchar(255) NOT NULL default '',
+ Description varchar(255) default NULL,
+ FileType int(11) NOT NULL default '0',
+ FileFound tinyint(3) unsigned NOT NULL default '0',
+ PRIMARY KEY (FileId),
+ KEY theme (ThemeId),
+ KEY FileName (FileName),
+ KEY FilePath (FilePath),
+ KEY FileFound (FileFound)
+);
+
+CREATE TABLE UserGroup (
+ PortalUserId int(11) NOT NULL default '0',
+ GroupId int(11) NOT NULL default '0',
+ MembershipExpires int(10) unsigned default NULL,
+ PrimaryGroup tinyint(4) NOT NULL default '1',
+ ExpirationReminderSent tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (PortalUserId,GroupId),
+ KEY GroupId (GroupId),
+ KEY PrimaryGroup (PrimaryGroup)
+);
+
+CREATE TABLE UserSession (
+ SessionKey varchar(50) NOT NULL default '',
+ CurrentTempKey varchar(50) default NULL,
+ PrevTempKey varchar(50) default NULL,
+ LastAccessed double NOT NULL default '0',
+ PortalUserId varchar(255) NOT NULL default '',
+ Language varchar(255) NOT NULL default '',
+ Theme varchar(255) NOT NULL default '',
+ GroupId int(11) NOT NULL default '0',
+ IpAddress varchar(20) NOT NULL default '0.0.0.0',
+ Status int(11) NOT NULL default '1',
+ GroupList varchar(255) default NULL,
+ tz int(11) default NULL,
+ PRIMARY KEY (SessionKey),
+ KEY UserId (PortalUserId),
+ KEY LastAccessed (LastAccessed)
+);
+
+CREATE TABLE EmailLog (
+ EmailLogId int(11) NOT NULL auto_increment,
+ fromuser varchar(200) default NULL,
+ addressto varchar(255) default NULL,
+ subject varchar(255) default NULL,
+ timestamp bigint(20) default '0',
+ event varchar(100) default NULL,
+ PRIMARY KEY (EmailLogId)
+);
+
+CREATE TABLE Cache (
+ VarName varchar(255) NOT NULL default '',
+ Data longtext,
+ Cached int(11) default NULL,
+ LifeTime int(11) NOT NULL default '-1',
+ PRIMARY KEY (VarName),
+ KEY Cached (Cached)
+);
+
+CREATE TABLE StdDestinations (
+ DestId int(11) NOT NULL auto_increment,
+ DestType int(11) NOT NULL default '0',
+ DestParentId int(11) default NULL,
+ DestName varchar(255) NOT NULL default '',
+ DestAbbr char(3) NOT NULL default '',
+ DestAbbr2 char(2) default '',
+ PRIMARY KEY (DestId)
+);
+
+CREATE TABLE Category (
+ CategoryId int(11) NOT NULL auto_increment,
+ `Type` int(11) NOT NULL default '0',
+ ParentId int(11) NOT NULL default '0',
+ Name varchar(255) NOT NULL default '',
+ l1_Name varchar(255) NOT NULL default '',
+ l2_Name varchar(255) NOT NULL default '',
+ l3_Name varchar(255) NOT NULL default '',
+ l4_Name varchar(255) NOT NULL default '',
+ l5_Name varchar(255) NOT NULL default '',
+ Filename varchar(255) NOT NULL default '',
+ AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
+ Description text NOT NULL,
+ l1_Description text NOT NULL,
+ l2_Description text NOT NULL,
+ l3_Description text NOT NULL,
+ l4_Description text NOT NULL,
+ l5_Description text NOT NULL,
+ CreatedOn int(11) NOT NULL default '0',
+ EditorsPick tinyint(4) NOT NULL default '0',
+ `Status` tinyint(4) NOT NULL default '0',
+ Pop tinyint(4) default NULL,
+ Priority int(11) NOT NULL default '0',
+ MetaKeywords varchar(255) default NULL,
+ CachedDescendantCatsQty int(11) default NULL,
+ CachedNavbar text NOT NULL,
+ l1_CachedNavbar text NOT NULL,
+ l2_CachedNavbar text NOT NULL,
+ l3_CachedNavbar text NOT NULL,
+ l4_CachedNavbar text NOT NULL,
+ l5_CachedNavbar text NOT NULL,
+ CreatedById int(11) NOT NULL default '0',
+ ResourceId int(11) default NULL,
+ ParentPath text NOT NULL,
+ NamedParentPath text NOT NULL,
+ MetaDescription varchar(255) default NULL,
+ HotItem int(11) NOT NULL default '2',
+ NewItem int(11) NOT NULL default '2',
+ PopItem int(11) NOT NULL default '2',
+ Modified int(11) NOT NULL default '0',
+ ModifiedById int(11) NOT NULL default '0',
+ CategoryTemplate varchar(255) NOT NULL default '',
+ CachedCategoryTemplate varchar(255) NOT NULL default '',
+ PRIMARY KEY (CategoryId),
+ UNIQUE KEY ResourceId (ResourceId),
+ KEY ParentId (ParentId),
+ KEY Modified (Modified),
+ KEY Priority (Priority),
+ KEY sorting (Name,Priority),
+ KEY Filename (Filename(5)),
+ KEY l1_Name (l1_Name(5)),
+ KEY l2_Name (l2_Name(5)),
+ KEY l3_Name (l3_Name(5)),
+ KEY l4_Name (l4_Name(5)),
+ KEY l5_Name (l5_Name(5)),
+ KEY l1_Description (l1_Description(5)),
+ KEY l2_Description (l2_Description(5)),
+ KEY l3_Description (l3_Description(5)),
+ KEY l4_Description (l4_Description(5)),
+ KEY l5_Description (l5_Description(5))
+);
+
+CREATE TABLE CategoryCustomData (
+ CustomDataId int(11) NOT NULL auto_increment,
+ ResourceId int(10) unsigned NOT NULL default '0',
+ KEY ResourceId (ResourceId),
+ PRIMARY KEY (CustomDataId)
+);
+
+CREATE TABLE CategoryItems (
+ `CategoryId` int(11) NOT NULL default '0',
+ `ItemResourceId` int(11) NOT NULL default '0',
+ `PrimaryCat` tinyint(4) NOT NULL default '0',
+ `ItemPrefix` varchar(50) NOT NULL default '',
+ `Filename` varchar(255) NOT NULL default '',
+ UNIQUE KEY `CategoryId` (`CategoryId`,`ItemResourceId`),
+ KEY `PrimaryCat` (`PrimaryCat`),
+ KEY `ItemPrefix` (`ItemPrefix`),
+ KEY `Filename` (`Filename`(4))
+);
+
+CREATE TABLE PermCache (
+ PermCacheId int(11) NOT NULL auto_increment,
+ CategoryId int(11) NOT NULL default '0',
+ PermId int(11) NOT NULL default '0',
+ ACL varchar(255) NOT NULL default '',
+ DACL varchar(255) NOT NULL default '',
+ PRIMARY KEY (PermCacheId),
+ KEY CategoryId (CategoryId),
+ KEY PermId (PermId)
+);
+
+CREATE TABLE Stylesheets (
+ StylesheetId int(11) NOT NULL auto_increment,
+ Name varchar(255) NOT NULL default '',
+ Description varchar(255) NOT NULL default '',
+ AdvancedCSS text NOT NULL,
+ LastCompiled int(10) unsigned NOT NULL default '0',
+ Enabled int(11) NOT NULL default '0',
+ PRIMARY KEY (StylesheetId)
+);
+
+CREATE TABLE PopupSizes (
+ PopupId int(10) unsigned NOT NULL auto_increment,
+ TemplateName varchar(255) NOT NULL default '',
+ PopupWidth int(11) NOT NULL default '0',
+ PopupHeight int(11) NOT NULL default '0',
+ PRIMARY KEY (PopupId),
+ KEY TemplateName (TemplateName)
+);
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/install/install_schema.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment