<?php
/*
* This file is part of Tribiq CMS - a web-based Content Management System
* and Extranet. Copyright (c) 2007-2010 Tribal Limited, registered in England.
* For more information please visit http://tribiq.com.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the
* Licence, or (at your option) any later version.
*
* Please support Free Software. If you use this program please credit
* the authors by placing a link "Powered by Tribiq CMS" to
* http://tribiq.com in the foot of all your templates.
*
* Tribiq CMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org.licenses/>.
*/
define('THIS_FILE_IS_BEING_DIRECTLY_ACCESSED', false);
header('Content-Type: text/javascript; charset=UTF-8');
require '../cmsincludes/cache.inc.php';
useCache('tribiq-inc-admin-js-'. CSS_JS_VERSION);
useGZIP($_GET['gz']);
require 'cmsincludes/cms.inc.php';
function incJS($file) {
if (file_exists($file. '.pack.js')) {
require $file. '.pack.js';
} elseif (file_exists($file. '.min.js')) {
require $file. '.min.js';
} elseif (file_exists($file. '.js')) {
require $file. '.js';
}
echo "\n/**/\n";
}
//Include all of the standard JavaScript Admin libraries for the CMS
incJS('cmsjs/admin');
incJS('cmsjs/admin_box');
incJS('cmsjs/admin_floating_box');
incJS('cmsjs/admin_toolbar');
//Get a few phrases used in admin mode
$phrases = array();
foreach(array(
'addToNest' => 'Add to Nest',
'cancel' => 'Cancel',
'choose' => 'Choose',
'close' => 'Close',
'closeEditorWarning' => 'Are you sure you wish to close the editor? You will lose any unsaved changes.',
'colDisplaySort' => 'Column display / sort',
'colon' => ': ',
'core' => 'Core',
'copy' => 'Copy',
'edit' => 'Edit',
'fal' => 'False',
'leavePageWarning' => 'You are currently editing this page. If you leave now you may lose any unsaved changes.',
'logIn' => 'Log In',
'moreActions' => 'More Actions',
'moreActionsTooltip' => 'Click for more actions',
'no' => 'No',
'noItems' => 'There is nothing to display in this view.',
'noItemsInSearch' => 'There is nothing that matches your search.',
'OK' => 'OK',
'publish' => 'Publish Immediately',
'save' => 'Save',
'selectAll' => 'Select all items in Panel',
'selected' => 'Selected',
'serverTime' => 'Server Time ',
'timedOut' => 'Your request timed out without a response. Your network connection may be down.',
'tru' => 'True',
'upload' => 'Upload',
'yes' => 'Yes',
'_BYTES' => ' B',
'_KBYTES' => ' KB',
'_MBYTES' => ' MB',
'_GBYTES' => ' GB',
'_TBYTES' => ' TB'
) as $code => $phrase) {
$phrases[$code] = getPhrase($phrase);
}
echo '
tribiqA.phrase = ', json_encode($phrases), ';';
//Include jQuery Plugins
//Note: this order is quite sensitive, as they give JavaScript errors if included in the wrong order
incJS('cmsjs/jqModal');
//Include the selectbox library for moving items between select lists
incJS('cmsjs/selectbox');