mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Some js cleanup
This commit is contained in:
@@ -1112,7 +1112,7 @@ function headerjs()
|
||||
//add required core lan - delete confirm message
|
||||
(".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
|
||||
</script>
|
||||
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||
|
||||
";
|
||||
|
||||
return $ret;
|
||||
|
@@ -203,7 +203,7 @@ class page_admin_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'page_id' => array('title'=> 'ID', 'width'=>'5%', 'forced'=> TRUE),
|
||||
'page_title' => array('title'=> CUSLAN_1, 'type' => 'method', 'width'=>'auto'),
|
||||
'page_title' => array('title'=> LAN_TITLE, 'type' => 'method', 'width'=>'auto'),
|
||||
'page_theme' => array('title'=> CUSLAN_2, 'type' => 'text', 'width' => 'auto','nolist'=>true),
|
||||
'page_template' => array('title'=> 'Template', 'type' => 'text', 'width' => 'auto'),
|
||||
'page_author' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'width' => 'auto', 'thclass' => 'left'),
|
||||
@@ -936,7 +936,7 @@ class page
|
||||
|
||||
$this->fields = array(
|
||||
'page_id' => array('title'=> 'ID', 'width'=>'5%', 'forced'=> TRUE),
|
||||
'page_title' => array('title'=> CUSLAN_1, 'type' => 'text', 'width'=>'auto'),
|
||||
'page_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width'=>'auto'),
|
||||
'page_theme' => array('title'=> CUSLAN_2, 'type' => 'text', 'width' => 'auto','nolist'=>true),
|
||||
'page_template' => array('title'=> 'Template', 'type' => 'text', 'width' => 'auto'),
|
||||
'page_author' => array('title'=> LAN_AUTHOR, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'),
|
||||
|
@@ -1450,30 +1450,4 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Handle page DOM within the page header
|
||||
*
|
||||
* @return string JS source
|
||||
*/
|
||||
function headerjs()
|
||||
{
|
||||
require_once (e_HANDLER.'js_helper.php');
|
||||
$ret = "
|
||||
<script type='text/javascript'>
|
||||
if(typeof e107Admin == 'undefined') var e107Admin = {}
|
||||
|
||||
/**
|
||||
* OnLoad Init Control
|
||||
*/
|
||||
e107Admin.initRules = {
|
||||
'Helper': true,
|
||||
'AdminMenu': false
|
||||
}
|
||||
</script>
|
||||
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||
";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
?>
|
@@ -451,31 +451,5 @@ function dirsize($dir)
|
||||
|
||||
|
||||
require_once("footer.php");
|
||||
/**
|
||||
* Handle page DOM within the page header
|
||||
*
|
||||
* @return string JS source
|
||||
*/
|
||||
function headerjs()
|
||||
{
|
||||
require_once(e_HANDLER.'js_helper.php');
|
||||
$ret = "
|
||||
<script type='text/javascript'>
|
||||
//add required core lan - delete confirm message
|
||||
(".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
|
||||
if(typeof e107Admin == 'undefined') var e107Admin = {}
|
||||
|
||||
/**
|
||||
* OnLoad Init Control
|
||||
*/
|
||||
e107Admin.initRules = {
|
||||
'Helper': true,
|
||||
'AdminMenu': false
|
||||
}
|
||||
</script>
|
||||
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||
";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
?>
|
@@ -29,6 +29,9 @@ e107::getDb()->db_Mark_Time('(Header Top)');
|
||||
e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2);
|
||||
e107::css('core', 'colorbox/colorbox.css', 'jquery');
|
||||
|
||||
e107::js('core', 'fancybox/jquery.fancybox-1.3.4.js', 'jquery', 2);
|
||||
e107::css('core', 'fancybox/jquery.fancybox-1.3.4.css', 'jquery');
|
||||
|
||||
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
|
||||
e107::js('core', 'jquery-ui-timepicker-addon.js', 'jquery', 2);
|
||||
|
||||
@@ -58,6 +61,12 @@ e107::css('core', 'core/all.jquery.css', 'jquery');
|
||||
e107::js("core", "core/admin.jquery.js","jquery",4); // Load all default functions.
|
||||
e107::js("core", "core/all.jquery.js","jquery",4); // Load all default functions.
|
||||
|
||||
|
||||
|
||||
|
||||
e107::js("core", "core/admin.js","prototype",3); // Load all default functions.
|
||||
|
||||
|
||||
//
|
||||
// *** Code sequence for headers ***
|
||||
// IMPORTANT: These items are in a carefully constructed order. DO NOT REARRANGE
|
||||
|
@@ -1896,42 +1896,8 @@ if (isset($_POST['check_avatar_sizes']))
|
||||
|
||||
|
||||
//Just in case...
|
||||
if(!e_AJAX_REQUEST) require_once("footer.php");
|
||||
if(!e_AJAX_REQUEST) require_once("footer.php");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Handle page DOM within the page header
|
||||
*
|
||||
* @return string JS source
|
||||
*/
|
||||
//function headerjs()
|
||||
//{
|
||||
// require_once(e_HANDLER.'js_helper.php');
|
||||
// //FIXME - how exactly to auto-call JS lan? This and more should be solved in Stage II.
|
||||
// $ret = "
|
||||
// <script type='text/javascript'>
|
||||
// //add required core lan - delete confirm message
|
||||
// (".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
|
||||
// </script>
|
||||
// <script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||
// ";
|
||||
//
|
||||
// return $ret;
|
||||
//}
|
||||
?>
|
@@ -923,8 +923,11 @@ function unused($lanfile,$script)
|
||||
}
|
||||
|
||||
$text .= "</tbody></table>";
|
||||
|
||||
|
||||
$mes->addInfo("Pink is unused LAN");
|
||||
|
||||
$ret['text'] = $text;
|
||||
$ret['text'] = $mes->render().$text;
|
||||
$ret['caption'] = "Deprecated LAN Check (experimental!)";
|
||||
|
||||
return $ret;
|
||||
@@ -962,6 +965,9 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){
|
||||
$commonPhrases = file_get_contents(e_LANGUAGEDIR."English/admin/lan_admin.php");
|
||||
$commonLines = explode("\n",$commonPhrases);
|
||||
|
||||
$foundSimilar = FALSE;
|
||||
$foundCommon = FALSE;
|
||||
|
||||
foreach($commonLines as $line)
|
||||
{
|
||||
if($match = getDefined($line))
|
||||
@@ -974,12 +980,20 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){
|
||||
// Check if a common phrases was used.
|
||||
foreach($ar as $def=>$common)
|
||||
{
|
||||
similar_text($value, $common, $p);
|
||||
|
||||
if(strtoupper(trim($value)) == strtoupper($common))
|
||||
{
|
||||
//$text .= "<div style='color:yellow'><b>$common</b></div>";
|
||||
$foundCommon = TRUE;
|
||||
break;
|
||||
}
|
||||
elseif($p > 55)
|
||||
{
|
||||
$foundSimilar = TRUE;
|
||||
break;
|
||||
}
|
||||
$p = 0 ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1021,9 +1035,24 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){
|
||||
{
|
||||
$color = "background-color:yellow";
|
||||
$disabled .= "<br /><i>".$common."</i> is a common phrase.<br />(Use <b>".$def."</b> instead.)";
|
||||
|
||||
// return "<tr><td style='width:25%;'>".$needle .$disabled. "</td><td></td></tr>";
|
||||
}
|
||||
|
||||
elseif($foundSimilar && $found && substr($def,0,4) == "LAN_")
|
||||
{
|
||||
$color = "background-color:#E9EAF2";
|
||||
$disabled .= " <a class='e-tip' href='#' title=\"".$value." :: ".$common."\">".round($p)."% like ".$def."</a> ";
|
||||
// $disabled .= " <a class='e-tip' href='#' title=\"".$common."\">" . $def."</a>"; // $common;
|
||||
}
|
||||
|
||||
if($disabled == " (disabled)")
|
||||
{
|
||||
$color = "background-color:#DFFFDF";
|
||||
}
|
||||
|
||||
|
||||
|
||||
return "<tr><td style='width:25%;$color'>".$needle .$disabled. "</td>".$text."</tr>";
|
||||
}
|
||||
|
||||
|
@@ -139,111 +139,6 @@ require_once("footer.php");
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
function headerjs()
|
||||
{
|
||||
return;
|
||||
|
||||
global $sql,$pref,$men;
|
||||
|
||||
if(!$men->dragDrop)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($_POST['custom_select']))
|
||||
{
|
||||
$curLayout = $_POST['custom_select'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp = explode('.', e_QUERY);
|
||||
$curLayout = ($tmp[1]) ? $tmp[1] : $pref['sitetheme_deflayout'];
|
||||
}
|
||||
$dbLayout = ($curLayout !=$pref['sitetheme_deflayout']) ? $curLayout : "";
|
||||
|
||||
|
||||
|
||||
if(strpos(e_QUERY, 'configure') !== FALSE )
|
||||
{
|
||||
|
||||
//FIXME - proto/scripty already loaded, create and jsmanager handler
|
||||
$ret = "
|
||||
|
||||
<!-- load prototype and scriptaculous -->
|
||||
<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script>
|
||||
<script type=\"text/javascript\">
|
||||
google.load(\"prototype\", \"1.6.0.3\");
|
||||
google.load(\"scriptaculous\", \"1.8.2\");
|
||||
</script>
|
||||
|
||||
<!-- load the portal script -->
|
||||
<script type=\"text/javascript\" src=\"".e_FILE_ABS."jslib/portal/portal.js\"></script>
|
||||
<link href=\"".e_FILE_ABS."jslib/portal/portal.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />
|
||||
|
||||
<!-- initiate the portal -->
|
||||
<script type=\"text/javascript\">
|
||||
var settings = {
|
||||
|
||||
";
|
||||
|
||||
|
||||
// ," menu_location !=0 AND menu_layout = '{$curLayout}' ORDER BY menu_location,menu_order"
|
||||
$qry = "SELECT * FROM #menus WHERE menu_location !=0 AND menu_layout = '".$dbLayout."' ORDER BY menu_location,menu_order";
|
||||
$sql -> db_Select_gen($qry);
|
||||
while($row = $sql-> db_Fetch())
|
||||
{
|
||||
|
||||
$portal[$row['menu_location']][] = "'block-".$row['menu_id']."--".$dbLayout."'";
|
||||
}
|
||||
|
||||
foreach($portal as $col=>$val)
|
||||
{
|
||||
$ret .= " \n'portal-column-".$col."':[".implode(",",$val)."],";
|
||||
}
|
||||
|
||||
$ret .= "
|
||||
};
|
||||
var options = {
|
||||
editorEnabled : true,
|
||||
'saveurl' : '".e_SELF."?ajax_used=1',
|
||||
hoverclass: 'block-hover'
|
||||
};
|
||||
|
||||
var data = { };
|
||||
|
||||
var portal;
|
||||
|
||||
Event.observe(window, 'load', function() {
|
||||
portal = new Portal(settings, options, data);
|
||||
}, false);
|
||||
|
||||
</script>";
|
||||
}
|
||||
|
||||
|
||||
/* this.options = {
|
||||
editorEnabled : false,
|
||||
portal : 'portal',
|
||||
column : 'portal-column',
|
||||
block : 'block',
|
||||
content : 'content',
|
||||
configElement : 'config',
|
||||
configSave : 'save-button',
|
||||
configCancel : 'cancel-button',
|
||||
handle : 'handle',
|
||||
hoverclass : false,
|
||||
remove : 'block-remove',
|
||||
config : 'block-config',
|
||||
blocklist : 'portal-column-block-list',
|
||||
blocklistlink : 'portal-block-list-link',
|
||||
blocklisthandle : 'block-list-handle',
|
||||
saveurl : false
|
||||
}
|
||||
*/
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
function menus_adminmenu()
|
||||
{
|
||||
|
@@ -60,12 +60,6 @@ if (isset ($_POST['useraction']) && $_POST['useraction'] == 'usersettings')
|
||||
|
||||
|
||||
|
||||
function headerjs()
|
||||
{
|
||||
// require_once (e_HANDLER.'js_helper.php');
|
||||
// return "<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>";
|
||||
}
|
||||
|
||||
|
||||
require_once (e_HANDLER.'message_handler.php');
|
||||
$emessage = & eMessage :: getInstance();
|
||||
|
@@ -29,7 +29,7 @@ class rater {
|
||||
$hintArray = array(RATELAN_POOR,RATELAN_FAIR,RATELAN_GOOD,RATELAN_VERYGOOD,RATELAN_EXCELLENT);
|
||||
|
||||
$datahint = implode(",",$hintArray);
|
||||
$path = e_FILE_ABS."jslib/rate/img/";
|
||||
$path = e_WEB_JS."rate/img/";
|
||||
|
||||
$score = ($score / 2);
|
||||
// var_dump($readonly);
|
||||
|
@@ -6,10 +6,10 @@
|
||||
* Admin Language File
|
||||
*
|
||||
*/
|
||||
define("CUSLAN_1", "Title");
|
||||
// define("CUSLAN_1", "Title");
|
||||
define("CUSLAN_2", "Type");
|
||||
define("CUSLAN_3", "Search engine friendly string");
|
||||
define("CUSLAN_4", "Delete this item?");
|
||||
// define("CUSLAN_4", "Delete this item?");
|
||||
define("CUSLAN_5", "Existing Pages");
|
||||
define("CUSLAN_7", "Menu Name");
|
||||
define("CUSLAN_8", "Title / Caption");
|
||||
|
@@ -899,32 +899,6 @@ function banners_adminlog($msg_num='00', $woffle='')
|
||||
$admin_log->log_event('BANNER_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle page DOM within the page header
|
||||
*
|
||||
* @return string JS source
|
||||
*/
|
||||
function headerjs()
|
||||
{
|
||||
require_once(e_HANDLER.'js_helper.php');
|
||||
$ret = "
|
||||
<script type='text/javascript'>
|
||||
//add required core lan - delete confirm message
|
||||
(".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
|
||||
if(typeof e107Admin == 'undefined') var e107Admin = {}
|
||||
|
||||
/**
|
||||
* OnLoad Init Control
|
||||
*/
|
||||
e107Admin.initRules = {
|
||||
'Helper': true,
|
||||
'AdminMenu': false
|
||||
}
|
||||
</script>
|
||||
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||
";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
?>
|
@@ -36,11 +36,7 @@ require_once(e_HANDLER."calendar/calendar_class.php");
|
||||
//$cal = new DHTML_Calendar(true);
|
||||
//$gen = new convert();
|
||||
|
||||
function headerjs()
|
||||
{
|
||||
// global $cal;
|
||||
// return $cal->load_files()."<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>\n";
|
||||
}
|
||||
|
||||
|
||||
$e_sub_cat = 'download';
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
|
@@ -123,7 +123,7 @@ $FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['nav_separator'] = '';
|
||||
|
||||
// external JS, comma separated list
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js'] = '{e_FILE}jslib/core/tabs.js';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js'] = '{e_WEB_JS}core/tabs.js';
|
||||
// inline JS, without <script> tags
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js_inline'] = 'new e107Widgets.Tabs("featurebox-tab-container", { bookmarkFix: false });';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js_type'] = 'prototype';
|
||||
@@ -231,7 +231,7 @@ $FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_item'] = ''; // <li><a href="#tab-{
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_end'] = ''; // </ul>';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_separator'] = '';
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js'] = '{e_FILE}jslib/camera/scripts/camera.min.js';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js'] = '{e_WEB_JS}camera/scripts/camera.min.js';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_inline'] = "$('.camera_wrap').camera({FEATUREBOX_PARMS});";
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_type'] = 'jquery';
|
||||
|
||||
|
Reference in New Issue
Block a user