mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
JS work and HTML cleanup
This commit is contained in:
parent
e9f6febe02
commit
9f1a322c98
@ -870,7 +870,7 @@ if(isset($page_title[$action]))
|
||||
<fieldset id='core-admin-log-list'>
|
||||
<legend class='e-hideme'>{$page_title[$action]}</legend>
|
||||
<table class='adminlist'>
|
||||
<colgroup span='4'>
|
||||
<colgroup>
|
||||
";
|
||||
|
||||
foreach($col_widths[$action] as $i)
|
||||
|
@ -955,7 +955,7 @@ class cron
|
||||
<form method='post' action='"
|
||||
.e_SELF."' id='cronform'>
|
||||
<table class='adminlist'>
|
||||
<colgroup span='8'>
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
|
@ -139,7 +139,7 @@ class emotec
|
||||
|
||||
$text = "
|
||||
<div class='admintabs' id='tab-container'>
|
||||
<ul class='e-tabs e-hideme' id='core-emote-tabs'>
|
||||
<ul class='e-tabs' id='core-emote-tabs'>
|
||||
<li id='tab-activate'><a href='#emoticon-activate'>".EMOLAN_1."</a></li>
|
||||
<li id='tab-packages'><a href='#emoticon-packages'>".EMOLAN_13."</a></li>
|
||||
</ul>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,13 @@ if (!getperms("I"))
|
||||
|
||||
e107::coreLan('links', true);
|
||||
|
||||
if(e_AJAX_REQUEST)
|
||||
{
|
||||
print_a($_POST);
|
||||
echo "HI THERE";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
class links_admin extends e_admin_dispatcher
|
||||
{
|
||||
@ -67,6 +74,7 @@ class links_admin_ui extends e_admin_ui
|
||||
protected $batchDelete = true;
|
||||
protected $batchCopy = true;
|
||||
protected $listOrder = 'link_order ASC';
|
||||
protected $listSorting = true;
|
||||
|
||||
public $current_parent = 0;
|
||||
public $sublink_data = null;
|
||||
|
@ -355,7 +355,7 @@ else
|
||||
<fieldset id='core-search-configuration-main'>
|
||||
<legend class='e-hideme'>".SEALAN_1."</legend>
|
||||
<table class='adminlist'>
|
||||
<colgroup span='4'>
|
||||
<colgroup>
|
||||
<col style='width:55%' />
|
||||
<col style='width:25%' />
|
||||
<col style='width:10%' />
|
||||
|
@ -4367,7 +4367,8 @@ class e_admin_form_ui extends e_form
|
||||
|
||||
e107::js('core','scriptaculous/controls.js','prototype', 2);
|
||||
//TODO - external JS
|
||||
e107::getJs()->footerInline("
|
||||
e107::js('footer-inline',"
|
||||
|
||||
//autocomplete fields
|
||||
\$\$('input[name=searchquery]').each(function(el, cnt) {
|
||||
if(!cnt) el.activate();
|
||||
@ -4399,7 +4400,7 @@ class e_admin_form_ui extends e_form
|
||||
});
|
||||
}
|
||||
});
|
||||
");
|
||||
",'prototype');
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
@ -156,8 +156,9 @@ class e_form
|
||||
//TODO Parse selection data back to parent form.
|
||||
|
||||
$url = e_ADMIN_ABS."image.php?mode=main&action=dialog".$cat;
|
||||
$url .= "&iframe=1";
|
||||
|
||||
$ret = "<a title='Click to Change' rel='external' class='e-dialog' href='".$url."'>".$label."</a>";
|
||||
$ret = "<a title='Click on a thumbnail to change..' rel='external' class='e-dialog' href='".$url."'>".$label."</a>";
|
||||
|
||||
// $footer = "<div style=\'padding:5px;text-align:center\' <a href=\'#\' >Save</a></div>";
|
||||
$footer = '';
|
||||
@ -172,7 +173,7 @@ class e_form
|
||||
$$("a.e-dialog").invoke("observe", "click", function(ev) {
|
||||
var element = ev.findElement("a");
|
||||
ev.stop();
|
||||
new e107Widgets.URLDialog(element.href + "&iframe=1", {
|
||||
new e107Widgets.URLDialog(element.href, {
|
||||
id: element["id"] || "e-dialog",
|
||||
width: 830,
|
||||
height: 650
|
||||
@ -182,26 +183,6 @@ class e_form
|
||||
|
||||
','prototype');
|
||||
|
||||
|
||||
/*
|
||||
e107::getJs()->requireCoreLib('core/admin.js')
|
||||
->requireCoreLib('core/dialog.js')
|
||||
->requireCoreLib('core/draggable.js')
|
||||
->coreCSS('core/dialog/dialog.css')
|
||||
->coreCSS('core/dialog/e107/e107.css')
|
||||
->footerInline('
|
||||
$$("a.e-dialog").invoke("observe", "click", function(ev) {
|
||||
var element = ev.findElement("a");
|
||||
ev.stop();
|
||||
new e107Widgets.URLDialog(element.href + "&iframe=1", {
|
||||
id: element["id"] || "e-dialog",
|
||||
width: 830,
|
||||
height: 650
|
||||
|
||||
}).center().setHeader("Media Manager : '.$category.'").setFooter('.$footer.').activate().show();
|
||||
});
|
||||
');
|
||||
*/
|
||||
e107::setRegistry('core/form/mediaurl', true);
|
||||
}
|
||||
return $ret;
|
||||
@ -1301,7 +1282,7 @@ class e_form
|
||||
if($cnt)
|
||||
{
|
||||
return '
|
||||
<tr'.$trclass.'>
|
||||
<tr'.$trclass.' id="'.$fieldvalues[$pid].'">
|
||||
'.$ret.'
|
||||
</tr>
|
||||
';
|
||||
@ -1989,12 +1970,16 @@ class e_form
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$text = '';
|
||||
|
||||
|
||||
//print_a($form_options);
|
||||
|
||||
foreach ($form_options as $fid => $options)
|
||||
{
|
||||
$tree_model = $tree_models[$fid];
|
||||
$tree = $tree_model->getTree();
|
||||
$total = $tree_model->getTotal();
|
||||
|
||||
|
||||
$amount = $options['perPage'];
|
||||
$from = vartrue($options['from'], 0);
|
||||
$field = vartrue($options['field'], $options['pid']);
|
||||
@ -2007,6 +1992,7 @@ class e_form
|
||||
$current_fields = varset($options['fieldpref']) ? $options['fieldpref'] : array_keys($options['fields']);
|
||||
$legend_class = vartrue($options['legend_class'], 'e-hideme');
|
||||
|
||||
|
||||
$text .= "
|
||||
<form method='post' action='{$formurl}' id='{$elid}-list-form'>
|
||||
<div>".$this->token()."
|
||||
@ -2017,7 +2003,7 @@ class e_form
|
||||
<table cellpadding='0' cellspacing='0' class='adminlist' id='{$elid}-list-table'>
|
||||
".$this->colGroup($fields, $current_fields)."
|
||||
".$this->thead($fields, $current_fields, varset($options['head_query']), varset($options['query']))."
|
||||
<tbody>
|
||||
<tbody id='e-sort'>
|
||||
";
|
||||
|
||||
if(!$tree)
|
||||
|
@ -382,8 +382,7 @@ class e_media
|
||||
{
|
||||
$onclicki = "parent.document.getElementById('{$tagid}').value = '{$im['media_url']}';
|
||||
parent.document.getElementById('".$prevId."').src = '{$realPath}';
|
||||
parent.e107Widgets.DialogManagerDefault.getWindow('e-dialog').close();
|
||||
return false;";
|
||||
return false;";
|
||||
}
|
||||
else // TinyMce and other applications.
|
||||
{
|
||||
@ -395,7 +394,7 @@ class e_media
|
||||
}
|
||||
|
||||
|
||||
$text .= "<a class='media-select' title=\"".$diz."\" href='#' onclick=\"{$onclicki}\" >\n";
|
||||
$text .= "<a class='media-select e-dialog-close' title=\"".$diz."\" href='#' onclick=\"{$onclicki}\" >\n";
|
||||
$text .= "<img src='".e107::getParser()->thumbUrl($im['media_url'], $att)."' alt=\"".$im['media_title']."\" />\n";
|
||||
$text .= "</a>\n\n";
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ class themeHandler
|
||||
$text .= "
|
||||
<div id='core-thememanager-configure'>
|
||||
<table cellpadding='0' cellspacing='0' class='adminform'>
|
||||
<colgroup span='3'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
<col class='col-control' />
|
||||
|
@ -1103,8 +1103,8 @@ class e_userperms
|
||||
<form method='post' action='".e_SELF."' id='myform'>
|
||||
<fieldset id='core-administrator-edit'>
|
||||
<legend class='e-hideme'>".ADMSLAN_52."</legend>
|
||||
<table cellpadding='0' cellspacing='0' class='adminform'>
|
||||
<colgroup span='2'>
|
||||
<table class='adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>
|
||||
@ -1157,10 +1157,10 @@ class e_userperms
|
||||
foreach($groupedList as $section=>$list)
|
||||
{
|
||||
$text .= "\t\t<table class='adminlist'>
|
||||
<colgroup span='3'>
|
||||
<col class='center' style='width:50px' />
|
||||
<col style='width:50px' />
|
||||
<col />
|
||||
<colgroup>
|
||||
<col class='center' style='width:50px' />
|
||||
<col style='width:50px' />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody><tr><td class='field-section' colspan='3'><h4>".$this->renderSectionDiz($section)."</h4></td></tr>"; //XXX Lan - General
|
||||
// $text .= "\t\t<div class='field-section'><h4>".$prm->renderSectionDiz($section)."</h4>"; //XXX Lan - General
|
||||
|
@ -41,7 +41,7 @@ define("IMODE", "lite");
|
||||
// [dont render core style sheet link]
|
||||
$no_core_css = TRUE;
|
||||
|
||||
//temporary fixed - awaiting theme.xml addition
|
||||
//Prototype Scripts
|
||||
e107::js('core', 'core/decorate.js', 'prototype', 2);
|
||||
e107::js('core', 'core/tabs.js', 'prototype', 2);
|
||||
|
||||
@ -68,6 +68,12 @@ e107::js('inline',"
|
||||
element.select('legend').invoke('hide');
|
||||
});
|
||||
|
||||
$$('a.e-dialog-close').invoke('observe', 'click', function(ev) {
|
||||
parent.e107Widgets.DialogManagerDefault.getWindow('e-dialog').close();
|
||||
});
|
||||
//
|
||||
|
||||
|
||||
}, document, true);
|
||||
"
|
||||
,'prototype');
|
||||
@ -87,90 +93,77 @@ e107::css('inline',"/******** Tabs JS */
|
||||
",'prototype');
|
||||
|
||||
|
||||
// jQUERY scripts
|
||||
|
||||
e107::js('core', 'core/colorbox/jquery.colorbox-min.js', 'jquery', 2);
|
||||
e107::css('core', 'core/colorbox/colorbox.css', 'jquery');
|
||||
|
||||
e107::js('inline','
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".e-hideme").hide();
|
||||
|
||||
$(".e-expandit").click(function () {
|
||||
$(".e-hideme").toggle("slow");
|
||||
$(".e-expandit").click(function () {
|
||||
$(".e-hideme").toggle("slow");
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
$( "#datepicker" ).datepicker();
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$( "#tab-container" ).tabs();
|
||||
$( "#tab-container" ).tabs();
|
||||
});
|
||||
|
||||
$(".adminlist tr:even").addClass("even");
|
||||
$(".adminlist tr:odd").addClass("odd");
|
||||
|
||||
$(".e-dialog").click(function () {
|
||||
var link = $(this).attr("href");
|
||||
$("").load(link).dialog({
|
||||
modal:true
|
||||
});
|
||||
return false;
|
||||
$("a.e-dialog").colorbox({
|
||||
iframe:true,
|
||||
width:"60%",
|
||||
height:"60%",
|
||||
speed:100
|
||||
});
|
||||
});
|
||||
|
||||
$(".e-dialog-close").click(function () {
|
||||
parent.$.colorbox.close()
|
||||
});
|
||||
|
||||
var fixHelper = function(e, ui) {
|
||||
ui.children().each(function() {
|
||||
$(this).width($(this).width());
|
||||
});
|
||||
return ui;
|
||||
};
|
||||
|
||||
$("#e-sort").sortable({
|
||||
helper: fixHelper,
|
||||
cursor: "move",
|
||||
opacity: 0.9,
|
||||
containment: "parent",
|
||||
update: function(event, ui) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "links.php?ajax_used=1",
|
||||
data: { name: "John", location: "Boston" }
|
||||
}).done(function( msg ) {
|
||||
alert( "Data Saved: " + msg + ui);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}).disableSelection();
|
||||
|
||||
})
|
||||
','jquery');
|
||||
|
||||
e107::css('inline',"
|
||||
.e-hideme { display:none; }
|
||||
#e-sort.tr { cursor: pointer;}
|
||||
",'jquery');
|
||||
|
||||
|
||||
/*
|
||||
<div class="admintabs" id="tab-container">
|
||||
<ul class="e-tabs e-hideme" id="core-emote-tabs">
|
||||
<li id="tab-general"><a href="#core-newspost-create">General Information</a></li>
|
||||
<li id="tab-seo"><a href="#core-newspost-seo">SEO</a></li>
|
||||
<li id="tab-advanced"><a href="#core-newspost-edit-options">Advanced Options</a></li>
|
||||
</ul>
|
||||
*/
|
||||
//
|
||||
// e107::getJs()->requireCoreLib(array(
|
||||
// 'core/decorate.js' => 2,
|
||||
// 'core/tabs.js' => 2
|
||||
// ));
|
||||
|
||||
function theme_head()
|
||||
{
|
||||
return '';
|
||||
|
||||
return "
|
||||
<script type='text/javascript'>
|
||||
/**
|
||||
* Decorate all tables having e-list class
|
||||
* TODO: add 'adminlist' class to all list core tables, allow theme decorate.
|
||||
*/
|
||||
e107.runOnLoad( function(event) {
|
||||
var element = event.memo['element'] ? $(event.memo.element) : $$('body')[0];
|
||||
|
||||
element.select('table.adminlist:not(.no-decorate)').each(function(element) {
|
||||
e107Utils.Decorate.table(element, {tr_td: 'first last'});
|
||||
});
|
||||
element.select('div.admintabs').each(function(element) {
|
||||
//show tab navaigation
|
||||
element.select('ul.e-tabs').each( function(el){
|
||||
el.show();
|
||||
el.removeClassName('e-hideme');//prevent hideme re-register (e.g. ajax load)
|
||||
});
|
||||
//init tabs
|
||||
new e107Widgets.Tabs(element);
|
||||
//hide legends if any
|
||||
element.select('legend').invoke('hide');
|
||||
});
|
||||
|
||||
}, document, true);
|
||||
|
||||
</script>";
|
||||
}
|
||||
// [layout]
|
||||
|
||||
$layout = "_default";
|
||||
|
Loading…
x
Reference in New Issue
Block a user