Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions assets/modules/docmanager/templates/main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
<h1>[+lang.DM_module_title+]</h1>
<div id="actions">
<ul class="actionButtons">
<li id="Button1"><a href="index.php?a=2"><img
src="media/style/common/images/icons/stop.png"/> [+lang.DM_close+]</a></li>
<li id="Button1"><a href="index.php?a=2">[+lang.DM_close+]</a></li>
</ul>
</div>
<div class="section">
Expand Down
6 changes: 2 additions & 4 deletions assets/modules/docmanager/templates/sort.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
</form>

<ul class="actionButtons">
<li id="sort_btn"><a href="#" onclick="save();"><img src="media/style/common/images/icons/save.png"
align="absmiddle"> [+lang.DM_go+]</a></li>
<li id="cancel"><a href="#" onclick="document.location.href='index.php?a=2';"><img
src="media/style/common/images/icons/cancel.png" align="absmiddle"> [+lang.DM_cancel+]</a></li>
<li id="sort_btn"><a href="#" onclick="save();">[+lang.DM_go+]</a></li>
<li id="cancel"><a href="#" onclick="document.location.href='index.php?a=2';">[+lang.DM_cancel+]</a></li>
</ul>
9 changes: 3 additions & 6 deletions assets/modules/docmanager/templates/sort_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@
</form>
<div id="actions">
<ul class="actionButtons">
<li id="Button1"><a href="index.php?a=2"><img
src="media/style/common/images/icons/stop.png" align="absmiddle"> [+lang.DM_close+]</a></li>
<li id="Button2" style="display:[+sort.save+]"><a href="#" onclick="save();"><img
src="media/style/common/images/icons/save.png" align="absmiddle"> [+lang.DM_save+]</a></li>
<li id="Button4"><a href="#" onclick="reset();"><img src="media/style/common/images/icons/cancel.png"
align="absmiddle"> [+lang.DM_cancel+]</a></li>
<li id="Button1"><a href="index.php?a=2">[+lang.DM_close+]</a></li>
<li id="Button2" style="display:[+sort.save+]"><a href="#" onclick="save();">[+lang.DM_save+]</a></li>
<li id="Button4"><a href="#" onclick="reset();">[+lang.DM_cancel+]</a></li>
</ul>
</div>
<div class="section">
Expand Down
6 changes: 2 additions & 4 deletions assets/modules/docmanager/templates/update.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
<h1>[+lang.DM_module_title+]</h1>
<div id="actions">
<ul class="actionButtons">
<li id="Button1"><a href="index.php?a=2"><img
src="media/style/common/images/icons/stop.png" align="absmiddle"> [+lang.DM_close+]</a></li>
<li id="Button4"><a href="#" onclick="reset();"><img src="media/style/common/images/icons/cancel.png"
align="absmiddle"> [+lang.DM_cancel+]</a></li>
<li id="Button1"><a href="index.php?a=2">[+lang.DM_close+]</a></li>
<li id="Button4"><a href="#" onclick="reset();">[+lang.DM_cancel+]</a></li>
</ul>
</div>

Expand Down
12 changes: 3 additions & 9 deletions assets/plugins/qm/inc/on_doc_form_prerender.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@
// Hide default manager action buttons
$mc->addLine('qmHide([document.getElementById("actions")]);');

// Get MODx theme
$qm_theme = evo()->config['manager_theme'];

// Get doc id
if (anyv('id')) {
$doc_id = (int)anyv('id');
Expand All @@ -84,25 +81,22 @@
}

// Add action buttons
// アイコンは付けない(どのテーマも .actionButtons a img を隠す。テーマに images/icons も無い)
if ($this->conf('prop_loadtb')) {
$mc->addLine(
sprintf(
'var controls = "<div style=\\"padding:4px 0;position:fixed;top:10px;right:-10px;z-index:1000\\" id=\\"qmcontrols\\" class=\\"actionButtons\\"><ul><li class=\\"primary\\"><a href=\\"#\\" onclick=\\"documentDirty=false;gotosave=true;document.mutate.save.click();return false;\\"><img src=\\"media/style/%s/images/icons/save.png\\" />%s</a></li><li><a href=\\"#\\" id=\\"cancel\\" onclick=\\"parent.location.href=\'%s\';return false;\\"><img src=\\"media/style/%s/images/icons/stop.png\\"/>%s</a></li></ul></div>";',
$qm_theme,
'var controls = "<div style=\\"padding:4px 0;position:fixed;top:10px;right:-10px;z-index:1000\\" id=\\"qmcontrols\\" class=\\"actionButtons\\"><ul><li class=\\"primary\\"><a href=\\"#\\" onclick=\\"documentDirty=false;gotosave=true;document.mutate.save.click();return false;\\">%s</a></li><li><a href=\\"#\\" id=\\"cancel\\" onclick=\\"parent.location.href=\'%s\';return false;\\">%s</a></li></ul></div>";',
$_lang['save'],
evo()->makeUrl($doc_id, '', '', 'full'),
$qm_theme,
$_lang['cancel']
)
);
} else {
$mc->addLine(
sprintf(
'var controls = "<div style=\\"padding:4px 0;position:fixed;top:10px;right:-10px;z-index:1000\\" id=\\"qmcontrols\\" class=\\"actionButtons\\"><ul><li class=\\"primary\\"><a href=\\"#\\" onclick=\\"documentDirty=false;gotosave=true;document.mutate.save.click();return false;\\"><img src=\\"media/style/%s/images/icons/save.png\\" />%s</a></li><li><a href=\\"#\\" id=\\"cancel\\" onclick=\\"parent.location.href=\'%s\';return false;\\"><img src=\\"media/style/%s/images/icons/stop.png\\"/>%s</a></li></ul></div>";',
$qm_theme,
'var controls = "<div style=\\"padding:4px 0;position:fixed;top:10px;right:-10px;z-index:1000\\" id=\\"qmcontrols\\" class=\\"actionButtons\\"><ul><li class=\\"primary\\"><a href=\\"#\\" onclick=\\"documentDirty=false;gotosave=true;document.mutate.save.click();return false;\\">%s</a></li><li><a href=\\"#\\" id=\\"cancel\\" onclick=\\"parent.location.href=\'%s\';return false;\\">%s</a></li></ul></div>";',
$_lang['save'],
evo()->makeUrl($doc_id, '', '', 'full'),
$qm_theme,
$_lang['cancel']
)
);
Expand Down
10 changes: 1 addition & 9 deletions manager/actions/document/document_data.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,31 +143,27 @@ function movedocument() {
<?php if (evo()->hasPermission('save_document')) : ?>
<li id="Button1" class="mutate">
<a href="javascript:void(0)" onclick="editdocument();">
<img src="<?= $_style["icons_edit_document"] ?>"/>
<?= $_lang['edit'] ?>
</a>
</li>
<?php endif; ?>
<?php if (evo()->hasPermission('save_document') && evo()->hasPermission('move_document')) : ?>
<li id="Button2" class="mutate">
<a href="#" onclick="movedocument();">
<img src="<?= $_style["icons_move_document"] ?>"/>
<?= $_lang['move'] ?>
</a>
</li>
<?php endif; ?>
<?php if (evo()->hasPermission('new_document') && evo()->hasPermission('save_document')) : ?>
<li id="Button4">
<a href="#" onclick="duplicatedocument();">
<img src="<?= $_style["icons_resource_duplicate"] ?>"/>
<?= $_lang['duplicate'] ?>
</a>
</li>
<?php endif; ?>
<?php if (evo()->hasPermission('delete_document') && evo()->hasPermission('save_document')) : ?>
<li id="Button3">
<a href="#" onclick="deletedocument();">
<img src="<?= $_style["icons_delete_document"] ?>"/>
<?= $_lang['delete'] ?>
</a>
</li>
Expand All @@ -181,7 +177,6 @@ function movedocument() {
: sprintf("window.open('../index.php?id=%s','previeWin')", $id);
?>"
>
<img src="<?= $_style["icons_preview_resource"] ?>"/>
<?= $_lang['view_resource'] ?>
</a>
</li>
Expand All @@ -200,10 +195,7 @@ function movedocument() {
echo 'document.location.href=\'index.php?a=2\';';
}
?>"
><img
alt="icons_cancel"
src="<?= $_style["icons_cancel"] ?>"
/> <?= $_lang['cancel'] ?></a>
><?= $_lang['cancel'] ?></a>
</li>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions manager/actions/document/move_document.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function get_src_content($id, $parent)
<h1>{$_lang['move_resource_title']}</h1>
<div id="actions">
<ul class="actionButtons">
<li><a href="#" onclick="document.newdocumentparent.submit();" class="primary"><img src="{$_style["icons_save"]}" /> {$_lang['save']}</a></li>
<li class="mutate"><a href="#" onclick="documentDirty=false;document.location.href='{$redirect}'"><img src="{$_style["icons_cancel"]}" /> {$_lang['cancel']}</a></li>
<li><a href="#" onclick="document.newdocumentparent.submit();" class="primary">{$_lang['save']}</a></li>
<li class="mutate"><a href="#" onclick="documentDirty=false;document.location.href='{$redirect}'">{$_lang['cancel']}</a></li>
</ul>
</div>

Expand Down
39 changes: 10 additions & 29 deletions manager/actions/document/mutate_content/action_buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,14 @@ function getActionButtons($id)

function ab_preview($id = 0)
{
$tpl = '<li id="preview"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style('icons_preview_resource');
$ph['alt'] = 'preview resource';
$tpl = '<li id="preview"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('preview');
return parseText($tpl, $ph);
}

function ab_save()
{
$tpl = '<li id="save" class="primary mutate"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a>[+select+]</li>';
$ph['icon'] = style('icons_save');
$ph['alt'] = 'icons_save';
$tpl = '<li id="save" class="primary mutate"><a href="#">[+label+]</a>[+select+]</li>';
$ph['label'] = lang('update');

$ph['select'] = '<span class="and"> + </span><select id="stay" name="stay">%s</select>';
Expand Down Expand Up @@ -114,9 +110,7 @@ function ab_save()

function ab_open_draft($id)
{
$tpl = '<li id="opendraft" class="opendraft mutate"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_save");
$ph['alt'] = 'icons_draft';
$tpl = '<li id="opendraft" class="opendraft mutate"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('open_draft');
return parseText($tpl, $ph);
}
Expand All @@ -131,63 +125,50 @@ function ab_create_draft($id)
return false;
}

$tpl = '<li id="createdraft" class="mutate"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_save");
$ph['alt'] = 'icons_draft';
$tpl = '<li id="createdraft" class="mutate"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('create_draft');

return parseText($tpl, $ph);
}

function ab_cancel($id)
{
$tpl = '<li id="cancel" class="mutate"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_cancel");
$ph['alt'] = 'icons_cancel';
$tpl = '<li id="cancel" class="mutate"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('cancel');
return parseText($tpl, $ph);
}

function ab_move()
{
$tpl = '<li id="move" class="mutate"><a href="#"><img src="[+icon+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_move_document");
$tpl = '<li id="move" class="mutate"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('move');
return parseText($tpl, $ph);
}

function ab_duplicate()
{
$tpl = '<li id="duplicate"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_resource_duplicate");
$ph['alt'] = 'icons_resource_duplicate';
$tpl = '<li id="duplicate"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('duplicate');
return parseText($tpl, $ph);
}

function ab_delete()
{
$tpl = '<li id="delete"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_delete_document");
$ph['alt'] = 'icons_delete_document';
$tpl = '<li id="delete"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('delete');
return parseText($tpl, $ph);
}

function ab_undelete()
{
$tpl = '<li id="undelete"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_undelete_resource");
$ph['alt'] = 'icons_undelete_document';
$tpl = '<li id="undelete"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('undelete_resource');
return parseText($tpl, $ph);
}

function ab_delete_draft()
{
$tpl = '<li id="deletedraft"><a href="#"><img src="[+icon+]" alt="[+alt+]" /> [+label+]</a></li>';
$ph['icon'] = style("icons_delete_document");
$ph['alt'] = 'icons_delete_document';
$tpl = '<li id="deletedraft"><a href="#">[+label+]</a></li>';
$ph['label'] = lang('delete_draft');
return parseText($tpl, $ph);
}
3 changes: 1 addition & 2 deletions manager/actions/document/parent_picker.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
<?php if (evo()->checkPermissions(0)): ?>
<li><a href="#" id="parentPickerRoot"><?= hsc(lang('parent_picker_root')) ?></a></li>
<?php endif; ?>
<li class="mutate"><a href="#" onclick="EvoShell.closeModal({reloadMain: false}); return false;"><img
src="<?= style('icons_cancel') ?>"/> <?= hsc(lang('cancel')) ?></a></li>
<li class="mutate"><a href="#" onclick="EvoShell.closeModal({reloadMain: false}); return false;"><?= hsc(lang('cancel')) ?></a></li>
</ul>
</div>

Expand Down
3 changes: 1 addition & 2 deletions manager/actions/document/publish_draft.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
include_once(MODX_MANAGER_PATH . 'actions/document/mutate_content/functions.php');

$ph['id'] = $docid;
$ph['style_icons_cancel'] = style('icons_cancel');
$ph['lang_cancel'] = lang('cancel');

$tpl = getTplDraft();
Expand Down Expand Up @@ -94,7 +93,7 @@ function getTplDraft()
<ul class="actionButtons">
<li class="mutate">
<a href="javascript:void(0)" onclick="document.location.href='index.php?a=131&id=[+id+]'">
<img src="[+style_icons_cancel+]" /> [+lang_cancel+]
[+lang_cancel+]
</a>
</li>
</ul>
Expand Down
23 changes: 7 additions & 16 deletions manager/actions/document/resources_list.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,27 +162,26 @@
<div id="actions">
<ul class="actionButtons">
<?php
$tpl = '<li id="%s" class="mutate"><a href="#" onclick="%s"><img src="%s" /> %s</a></li>';
$tpl = '<li id="%s" class="mutate"><a href="#" onclick="%s">%s</a></li>';
if (hasPermission('save_document') && $id != 0 && manager()->isAllowed($id)) {
echo sprintf($tpl, 'Button1', 'editdocument();', $_style["icons_edit_document"], $_lang['edit']);
echo sprintf($tpl, 'Button1', 'editdocument();', $_lang['edit']);
}
if (hasPermission('move_document') && hasPermission('save_document') && $id != 0 && manager()->isAllowed($id)) {
echo sprintf($tpl, 'Button2', 'movedocument();', $_style["icons_move_document"], $_lang['move']);
echo sprintf($tpl, 'Button2', 'movedocument();', $_lang['move']);
}
if (evo()->doc->canCopyDoc() && $id != 0 && manager()->isAllowed($id)) {
echo sprintf($tpl, 'Button4', 'duplicatedocument();', $_style["icons_resource_duplicate"],
$_lang['duplicate']);
echo sprintf($tpl, 'Button4', 'duplicatedocument();', $_lang['duplicate']);
}
if (hasPermission('delete_document') && hasPermission('save_document') && $id != 0 && manager()->isAllowed($id)) {
echo sprintf($tpl, 'Button3', 'deletedocument();', $_style["icons_delete_document"], $_lang['delete']);
echo sprintf($tpl, 'Button3', 'deletedocument();', $_lang['delete']);
}

$url = evo()->makeUrl($id);
$prev = "window.open('" . $url . "','previeWin')";
echo sprintf($tpl, 'Button6', $prev, $_style["icons_preview_resource"],
echo sprintf($tpl, 'Button6', $prev,
$id == 0 ? $_lang["view_site"] : $_lang['view_resource']);
$action = "documentDirty=false;document.location.href='" . getReturnAction($current) . "'";
echo sprintf($tpl, 'Button5', $action, $_style["icons_cancel"], $_lang['cancel']);
echo sprintf($tpl, 'Button5', $action, $_lang['cancel']);
?>
</ul>
</div>
Expand All @@ -194,19 +193,11 @@
<ul class="actionButtons">
<li class="mutate">
<a href="index.php?a=4&amp;pid=<?= $id ?>">
<img
src="<?= $_style["icons_new_document"] ?>"
align="absmiddle"
/>
<?= $_lang['create_resource_here'] ?>
</a>
</li>
<li class="mutate">
<a href="index.php?a=72&amp;pid=<?= $id ?>">
<img
src="<?= $_style["icons_new_weblink"] ?>"
align="absmiddle"
/>
<?= $_lang['create_weblink_here'] ?>
</a>
</li>
Expand Down
3 changes: 1 addition & 2 deletions manager/actions/document/revision.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
}

$ph['id'] = $id;
$ph['style_icons_cancel'] = $_style["icons_cancel"];
$ph['lang_cancel'] = $_lang['cancel'];

switch (getv('mode')) {
Expand Down Expand Up @@ -46,7 +45,7 @@ function tpl()
<ul class="actionButtons">
<li class="mutate">
<a href="javascript:void(0)" onclick="document.location.href='index.php?a=2'">
<img src="[+style_icons_cancel+]" /> [+lang_cancel+]
[+lang_cancel+]
</a>
</li>
</ul>
Expand Down
Loading
Loading