@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb011 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
tmpl
/
cms
/
Path :
Upload File :
New :
File
Dir
//homepage/v-mt/tmpl/cms/edit_entry.tmpl
<mt:if name="object_type" eq="page"> <mt:if name="can_manage_pages"> <$mt:setvar name="can_publish_post" value="1"$> </mt:if> <$mt:setvar name="page_title" value="<__trans phrase="Edit Page">"$> <mt:if name="new_object"> <$mt:setvar name="page_title" value="<__trans phrase="Create Page">"$> </mt:if> <$mt:setvar name="disp_prefs_show_category" value="1"$> <$mt:setvar name="container_label" value="<__trans phrase="Folder">"$> <$mt:setvar name="add_container_label" value="<__trans phrase="Add folder">"$> <$mt:setvar name="add_container_label_name" value="<__trans phrase="Add folder name">"$> <$mt:setvar name="add_new_container_label_parent" value="<__trans phrase="Add new folder parent">"$> <$mt:setvar name="manage_container_label" value="<__trans phrase="Manage Pages">"$> <$mt:setvar name="basename_label" value="<__trans phrase="Filename">"$> <$mt:setvar name="container_label_plural" value="<__trans phrase="Folders">"$> <$mt:setvar name="container_type" value="Folder"> <$mt:setvar name="submit_button_title" value="<__trans phrase="Save this page (s)" escape="html">"$> <$mt:setvar name="preview_button_title" value="<__trans phrase="Preview this page (v)" escape="html">"$> <$mt:setvar name="delete_button_title" value="<__trans phrase="Delete this page (x)" escape="html">"$> <mt:if name="status_publish"> <mt:if name="entry_permalink"> <mt:setvarblock name="view_link"> <a href="<$mt:var name="entry_permalink"$>" target="<__trans phrase="_external_link_target">"><__trans phrase="View Page"></a></li> </mt:setvarblock> </mt:if> </mt:if> <mt:else> <$mt:setvar name="page_title" value="<__trans phrase="Edit Entry">"$> <mt:if name="new_object"> <$mt:setvar name="page_title" value="<__trans phrase="Create Entry">"$> </mt:if> <$mt:setvar name="container_label" value="<__trans phrase="Category">"$> <$mt:setvar name="add_container_label" value="<__trans phrase="Add category">"$> <$mt:setvar name="add_container_label_name" value="<__trans phrase="Add category name">"$> <$mt:setvar name="add_new_container_label_parent" value="<__trans phrase="Add new category parent">"$> <$mt:setvar name="manage_container_label" value="<__trans phrase="Manage Entries">"$> <$mt:setvar name="basename_label" value="<__trans phrase="Basename">"$> <$mt:setvar name="container_label_plural" value="<__trans phrase="Categories">"$> <$mt:setvar name="container_type" value="Category"> <$mt:setvar name="container_label_class" value="no-header"$> <$mt:setvar name="submit_button_title" value="<__trans phrase="Save this entry (s)" escape="html">"$> <$mt:setvar name="preview_button_title" value="<__trans phrase="Preview this entry (v)" escape="html">"$> <$mt:setvar name="delete_button_title" value="<__trans phrase="Delete this entry (x)" escape="html">"$> <mt:if name="status_publish"> <mt:if name="entry_permalink"> <mt:setvarblock name="view_link"> <a href="<$mt:var name="entry_permalink"$>" target="<__trans phrase="_external_link_target">"><__trans phrase="View Entry"></a></li> </mt:setvarblock> </mt:if> </mt:if> </mt:if> <mt:setvartemplate name="action_buttons"> <button mt:mode="save_entry" type="submit" accesskey="s" title="<mt:var name="submit_button_title">" class="primary-button" ><__trans phrase="Save"></button> <button mt:mode="preview_entry" name="preview_entry" type="submit" accesskey="v" title="<mt:var name="preview_button_title">" ><__trans phrase="Preview"></button> <mt:if name="id"> <button mt:command="do-remove-items" mt:object-singular="<mt:var name="object_label" lower_case="1" escape="html">" mt:object-plural="<mt:var name="object_label_plural" lower_case="1" escape="html">" mt:object-type="<mt:var name="object_type" escape="html">" mt:blog-id="<mt:var name="blog_id">" type="submit" accesskey="x" title="<mt:var name="delete_button_title">" ><__trans phrase="Delete"></button> </mt:if> <div id="autosave-notification-<$mt:var name="bar_position" default="top"$>" class="autosave-notification"></div> </mt:setvartemplate> <mt:setvarblock name="system_msg"> <div id="msg-block"> <mt:unless name="recovered_object"> <mt:if name="autosaved_object_exists"> <mtapp:statusmsg id="recovered-object" class="info"> <mt:if name="object_type" eq="entry"> <__trans phrase="A saved version of this entry was auto-saved [_2]. <a href="[_1]">Recover auto-saved content</a>" params="<mt:var name="script_url">?__mode=view&_type=<mt:var name="object_type">&_recover=1<mt:if name="id">&id=<mt:var name="id"></mt:if><mt:if name="blog_id">&blog_id=<mt:var name="blog_id"></mt:if>%%<mt:date ts="$autosaved_object_ts" relative="1">"> <mt:else> <__trans phrase="A saved version of this page was auto-saved [_2]. <a href="[_1]">Recover auto-saved content</a>" params="<mt:var name="script_url">?__mode=view&_type=<mt:var name="object_type">&_recover=1<mt:if name="id">&id=<mt:var name="id"></mt:if><mt:if name="blog_id">&blog_id=<mt:var name="blog_id"></mt:if>%%<mt:date ts="$autosaved_object_ts" relative="1">"> </mt:if> </mtapp:statusmsg> </mt:if> </mt:unless> <mt:if name="saved_added"> <mtapp:statusmsg id="saved-added" class="success"> <mt:if name="object_type" eq="entry"> <__trans phrase="This entry has been saved."> <mt:else> <__trans phrase="This page has been saved."> </mt:if> <$mt:var name="view_link"$> </mtapp:statusmsg> </mt:if> <mt:if name="saved_changes"> <mtapp:statusmsg id="saved-changes" class="success"> <__trans phrase="Your changes have been saved."> <$mt:var name="view_link"$> </mtapp:statusmsg> </mt:if> <mt:if name="ping_errors"> <mtapp:statusmsg id="ping-errors" class="alert"> <__trans phrase="One or more errors occurred when sending update pings or TrackBacks."> <mt:if name="can_view_log"><__trans phrase="_USAGE_VIEW_LOG" params="<$mt:var name="script_url"$>?__mode=view_log&blog_id=<$mt:var name="blog_id"$>"></mt:if> </mtapp:statusmsg> </mt:if> <mt:if name="saved_prefs"> <mtapp:statusmsg id="saved-prefs" class="success"> <__trans phrase="Your customization preferences have been saved, and are visible in the form below."> </mtapp:statusmsg> </mt:if> <mt:if name="saved_comment"> <mtapp:statusmsg id="saved-comment" class="success" rebuild="all"> <__trans phrase="Your changes to the comment have been saved."> </mtapp:statusmsg> </mt:if> <mt:if name="saved_notify"> <mtapp:statusmsg id="saved-notify" class="success"> <__trans phrase="Your notification has been sent."> </mtapp:statusmsg> </mt:if> <mt:if name="recovered_object"> <mtapp:statusmsg id="recovered-object" class="success"> <mt:if name="object_type" eq="entry"> <__trans phrase="You have successfully recovered your saved entry."> <mt:else> <__trans phrase="You have successfully recovered your saved page."> </mt:if> </mtapp:statusmsg> </mt:if> <mt:if name="recovered_failed"> <mtapp:statusmsg id="recovered-failed" class="error"> <mt:if name="object_type" eq="entry"> <__trans phrase="An error occurred while trying to recover your saved entry."> <mt:else> <__trans phrase="An error occurred while trying to recover your saved page."> </mt:if> </mtapp:statusmsg> </mt:if> <mt:if name="saved_deleted"> <mtapp:statusmsg id="saved-deleted" class="success"> <__trans phrase="You have successfully deleted the checked comment(s)."> </mtapp:statusmsg> </mt:if> <mt:if name="saved_deleted_ping"> <mtapp:statusmsg id="saved-deleted-ping" class="success"> <__trans phrase="You have successfully deleted the checked TrackBack(s)."> </mtapp:statusmsg> </mt:if> <mt:if name="error"> <mtapp:statusmsg id="generic-error" class="error"> <mt:var name="error"> </mtapp:statusmsg> </mt:if> </div> </mt:setvarblock> <mt:setvarblock name="form_header"> <form name="entry_form" id="entry_form" method="post" action="<$mt:var name="script_url"$>" mt:once="1" mt:auto-save="1" mt:auto-save-delay="<$mt:var name="autosave_frequency"$>000"> <mt:if name="new_object"> <input type="hidden" name="author_id" value="<$mt:var name="author_id"$>" /> <mt:else> <input type="hidden" name="id" value="<$mt:var name="id"$>" /> </mt:if> <input type="hidden" name="blog_id" value="<$mt:var name="blog_id"$>" id="blog-id" /> <input type="hidden" name="__mode" value="save_entry" /> <input type="hidden" name="_type" value="<$mt:var name="object_type"$>" /> <input type="hidden" name="return_args" value="<$mt:var name="return_args" escape="html"$>" /> <input type="hidden" name="magic_token" value="<$mt:var name="magic_token"$>" id="m_t" /> <input type="hidden" name="action_name" value="" /> <input type="hidden" name="itemset_action_input" value="" /> </mt:setvarblock> <mt:setvarblock name="category_setting"> <mtapp:setting id="category" label="$container_label" label_class="$container_label_class" help_page="entries" help_section="entry_categories"> <script type="text/javascript"> /* <![CDATA[ */ MT.App.selectedCategoryList = <$mt:if name="selected_category_loop"><$mt:var name="selected_category_loop" to_json="1"$><mt:else>[]</mt:if>; MT.App.objectType = '<mt:var name="object_type" escape="js">'; Template.templates.categoryList = '<mt:section encode_js="1"> [# if ( !items.length ) { #] <span class="disabled">[#|h trans("None selected") #]</span> [#* return #] [# } #] <ul class="<$mt:var name="container_type" lower_case="1"$>-list pkg"> [# var map = {}; #] [# for ( var i = 0; i < items.length; i++ ) { #] [# if ( items[ i ] == 0 && i == 0 ) { #] [#-- special case, no primary selected, but has secondaries --#] [# continue #] [# } #] [# var cat = cache.getItem( "cat:"+items[ i ] ); #] [# if ( !cat ) continue; #] [# var label; #] [# if ( cat.path.length ) { label = []; for ( var j = 0; j < cat.path.length; j++ ) { var c = cache.getItem( "cat:"+cat.path[ j ] ); if ( c ) label.push( <mt:if name="object_type" ne="page">c.label<mt:else>c.basename</mt:if> ); } label.push( <mt:if name="object_type" ne="page">cat.label<mt:else>cat.basename</mt:if> ); for ( var j = 0; j < label.length; j++ ) label[ j ] = context.f.h( label[ j ] ); label = label.join( <mt:if name="object_type" ne="page">' » '<mt:else>''</mt:if> ); } else { label = context.f.h( <mt:if name="object_type" ne="page">cat.label<mt:else>cat.basename</mt:if> ); } #] <mt:if name="object_type" ne="page"> [# if ( i == 0 ) { #] <li class="primary pkg" mt:focus-hover="1" mt:id="[#= cat.id #]"><strong>[#= label #]</strong><a href="javascript:void(0);" mt:command="remove" class="delete" title="[#|h trans("Remove") #]"> <span>[#|h trans("Remove") #]</span></a></li> [# } else { #] <li class="pkg" mt:focus-hover="1" mt:id="[#= cat.id #]"><mt:if name="object_type" eq="entry"><a mt:focus-hover="1" href="javascript:void(0);" mt:command="primary" class="primary" title="[#|h trans("Make primary") #]">[#= label #]</a></mt:if><a mt:focus-hover="1" href="javascript:void(0);" mt:command="remove" class="delete" title="[#|h "Remove" #]"> <span>[#|h trans("Remove") #]</span></a></li> [# } #] <mt:else> <li class="pkg" mt:focus-hover="1" mt:id="[#= cat.id #]">[#= label #]</li> </mt:if> [# } #] </ul> </mt:section>'; /* ]]> */ </script> <mt:if name="object_type" eq="page"> <div mt:delegate="category-list" id="category-list"></div> <a href="javascript:void(0);" class="change-folder-link" mt:command="open-category-selector" title="<__trans phrase="Add folder">"><__trans phrase="Change Folder"/></a> </mt:if> <mt:include name="include/category_selector.tmpl"> <mt:if name="object_type" eq="entry"> <div mt:delegate="category-list" id="category-list"></div> </mt:if> <input id="category-ids" type="hidden" name="category_ids" value="<$mt:var name="selected_category_loop" glue=","$>" /> </mtapp:setting> </mt:setvarblock> <mt:setvarblock name="related_content"> <mt:unless name="new_object"> <mt:setvarblock name="stats_widget_id"><$mt:var name="object_type"$>-stats-widget</mt:setvarblock> <mtapp:widget id="$stats_widget_id" class="stats-widget" label="<__trans phrase="Stats">"> <div class="object-status"> <ul class="pkg"> <li class="object-status-detail"> <mt:if name="status_draft"> <span class="icon-left-wide icon-draft"><__trans phrase="Unpublished (Draft)"></span> <mt:else name="status_review"> <span class="icon-left-wide icon-warning"><__trans phrase="Unpublished (Review)"></span> <mt:else name="status_future"> <span class="icon-left-wide icon-future"><__trans phrase="Scheduled"></span> <mt:else name="status_publish"> <span class="icon-left-wide icon-success"><__trans phrase="Published"></span> </mt:if> </li> <mt:if name="status_publish"> <mt:if name="entry_permalink"> <li class="view-entry-link"><a href="<$mt:var name="entry_permalink"$>" target="<__trans phrase="_external_link_target">" class="icon-left-wide icon-view"><__trans phrase="View"></a></li> </mt:if> <mt:if name="can_send_notifications"> <li><a href="javascript:void(0)" onclick="openDialog(null,'entry_notify','blog_id=<mt:var name="blog_id">&entry_id=<mt:var name="id">');return false;" class="icon-left-wide icon-share"><__trans phrase="Share"></a></li> </mt:if> </mt:if> </ul> </div> <ul class="object-stats"> <li class="comments-link"><__trans phrase="<a href="[_2]">[quant,_1,comment,comments]</a>" params="<$mt:var name="num_comments"$>%%<$mt:var name="script_url">?__mode=list_comments&filter_key=_comments_by_entry&filter_val=<$mt:var name="id"$>&blog_id=<$mt:var name="blog_id"$>"></li> <li class="pings-link"><__trans phrase="<a href="[_2]">[quant,_1,trackback,trackbacks]</a>" params="<$mt:var name="num_pings"$>%%<$mt:var name="script_url">?__mode=list_pings&filter=entry_id&filter_val=<$mt:var name="id"$>&blog_id=<$mt:var name="blog_id"$>"></li> </ul> </mtapp:widget> </mt:unless> <div id="publishing-field"<mt:unless name="disp_prefs_show_publishing"> class="hidden"</mt:unless>> <mtapp:widget id="entry-publishing-widget" label="<__trans phrase="Publishing">"> <mtapp:setting id="status" label="<__trans phrase="Status">" help_page="entries" help_section="status"> <mt:unless name="sitepath_configured"> <input type="hidden" name="status" id="status" value="1" /><span><__trans phrase="Unpublished"></span> <span class="alert-warning-inline"><img src="<$mt:var name="static_uri"$>images/status_icons/warning.gif" alt="<__trans phrase="Warning">" width="9" height="9" /> <a href="<$mt:var name="script_url"$>?__mode=cfg_archives&id=<$mt:var name="blog_id"$>&blog_id=<$mt:var name="blog_id"$>"><mt:if name="object_type" eq="entry"><__trans phrase="You must configure this blog before you can publish this entry."><mt:else><__trans phrase="You must configure this blog before you can publish this page."></mt:if></a></span> <mt:else> <mt:if name="can_publish_post"> <select name="status" id="status" class="full-width" tabindex="9" onchange="highlightSwitch(this)"> <option value="1"<mt:if name="status_draft"> selected="selected"</mt:if>><__trans phrase="Unpublished (Draft)"></option> <option value="2"<mt:if name="status_publish"> selected="selected"</mt:if>><__trans phrase="Published"></option> <mt:if name="status_review"> <option value="3"<mt:if name="status_review"> selected="selected"</mt:if>><__trans phrase="Unpublished (Review)"></option> </mt:if> <mt:if name="new_object"> <option value="4"<mt:if name="status_future"> selected="selected"</mt:if>><__trans phrase="Scheduled"></option> <mt:else> <mt:unless name="status_publish"> <option value="4"<mt:if name="status_future"> selected="selected"</mt:if>><__trans phrase="Scheduled"></option> </mt:unless> </mt:if> </select> <mt:else> <mt:if name="new_object"> <input type="hidden" name="status" id="status" value="1" /><span><__trans phrase="Unpublished"></span> <mt:else> <mt:if name="status_draft"> <input type="hidden" name="status" id="status" value="1" /><span><__trans phrase="Unpublished (Draft)"></span> <mt:else name="status_publish"> <input type="hidden" name="status" id="status" value="2" /><span><__trans phrase="Published"></span> <mt:else name="status_future"> <input type="hidden" name="status" id="status" value="4" /><span><__trans phrase="Scheduled"></span> <mt:else name="status_review"> <input type="hidden" name="status" id="status" value="3" /><span><__trans phrase="Unpublished (Review)"></span> </mt:if> </mt:if> </mt:if> </mt:unless> <mt:unless name="new_object"> <ul> <li><__trans phrase="[_1] - Created by [_2]" params="<$mt:date ts="$created_on_ts" relative="1" _default="$created_on_formatted"$>%%<$mt:var name="created_by" escape="html"$>"></li> <mt:if name="status_publish"> <li><__trans phrase="[_1] - Published by [_2]" params="<$MTDate ts="$authored_on_ts" relative="1" _default="$authored_on_formatted"$>%%<$mt:var name="author_name" escape="html"$>"></li> </mt:if> <mt:if name="modified_by"> <li><__trans phrase="[_1] - Edited by [_2]" params="<$MTDate ts="$modified_on_ts" relative="1" _default="$modified_on_formatted"$>%%<$mt:var name="modified_by" escape="html"$>"></li> </mt:if> </ul> </mt:unless> </mtapp:setting> <mt:if name="status_future"> <$mt:setvar name="authored_on_label" value="<__trans phrase="Publish On">"$> <mt:else> <$mt:setvar name="authored_on_label" value="<__trans phrase="Publish Date">"$> </mt:if> <mtapp:setting id="authored_on" label="$authored_on_label" help_page="entries" help_section="date"> <span class="date-time-fields<mt:if name="status_future"><mt:if name="can_publish_post"> highlight</mt:if></mt:if>"> <input id="created-on" class="entry-date" name="authored_on_date" tabindex="10" value="<$mt:var name="authored_on_date" escape="html"$>" /> <a href="javascript:void(0);" mt:command="open-calendar-created-on" class="date-picker" title="<__trans phrase="Select entry date">"><span>Choose Date</span></a> <input class="entry-time" name="authored_on_time" tabindex="11" value="<$mt:var name="authored_on_time" escape="html"$>" /> </span> </mtapp:setting> <mt:if name="object_type" eq="page"> <$mt:var name="category_setting"$> </mt:if> <mtapp:setting id="basename" label="$basename_label" help_page="entries" help_section="basename"> <input type="hidden" name="basename_old" id="basename_old" value="<$mt:var name="basename_old" escape="html"$>" /> <input type="text" <mt:if name="object_type" eq="entry">disabled="disabled"</mt:if> name="basename" id="basename" value="<$mt:var name="basename"$>" onchange="setElementValue('basename', dirify(this.value))" tabindex="12" /> <mt:if name="object_type" eq="page"> <span class="file-extension"><$mt:var name="file_extension"$></span> </mt:if> <mt:if name="object_type" eq="entry"> <mt:if name="can_publish_post"> <a href="javascript:void(0);" id="basename-lock" title="<__trans phrase="Unlock this entry’s output filename for editing">" onclick="return toggleFile()"><span>Unlock</span></a> </mt:if> <p class="alert-warning-inline" id="basename-warning" style="display: none"> <img src="<$mt:var name="static_uri"$>images/status_icons/warning.gif" alt="<__trans phrase="Warning">" width="9" height="9" /> <mt:if name="new_object"> <__trans phrase="Warning: If you set the basename manually, it may conflict with another entry."> <mt:else> <__trans phrase="Warning: Changing this entry's basename may break inbound links."> </mt:if> </p> <input type="hidden" name="basename_manual" id="basename_manual" value="0" /> <mt:else> <input type="hidden" name="basename_manual" id="basename_manual" value="1" /> </mt:if> </mtapp:setting> </mtapp:widget> </div> <div id="category-field"<mt:unless name="disp_prefs_show_category"> class="hidden"</mt:unless>> <mt:if name="object_type" eq="entry"> <mt:setvarblock name="header_action"> <a href="javascript:void(0)" class="add-new-category-link" id="open-category-selector1" mt:command="open-category-selector" mt:close-el="close-category-selector1" title="<__trans phrase="Add category">"><__trans phrase="edit"/></a> <a href="javascript:void(0)" class="add-category-toggle-link hidden" mt:command="close-category-selector" id="close-category-selector1"><__trans phrase="close"></a> </mt:setvarblock> <mtapp:widget id="entry-category-widget" label="<__trans phrase="Categories">" header_action="$header_action"> <$mt:var name="category_setting"$> </mtapp:widget> </mt:if> </div> <div id="feedback-field"<mt:unless name="disp_prefs_show_feedback"> class="hidden"</mt:unless>> <mtapp:widget id="entry-feedback-widget" label="<__trans phrase="Feedback">"> <mtapp:setting id="allow_feedback" label="<__trans phrase="Accept">" help_page="entries" help_section="accept_comments"> <ul> <li><input type="checkbox" name="allow_comments" id="allow_comments" tabindex="14" value="1"<mt:if name="allow_comments"> checked="checked"</mt:if> class="cb" /> <label for="allow_comments"><__trans phrase="Comments"/></label></li> <li><input type="checkbox" name="allow_pings" id="allow_pings" tabindex="15" value="1"<mt:if name="allow_pings"> checked="checked"</mt:if> class="cb" /> <label for="allow_pings"><__trans phrase="TrackBacks"/></label></li> </ul> </mtapp:setting> <mtapp:setting id="ping_urls" label="<__trans phrase="Outbound TrackBack URLs">" help_page="entries" help_section="urls_to_ping"> <textarea name="to_ping_urls" id="to_ping_urls" class="full-width short" tabindex="16" cols="" rows=""><$mt:var name="to_ping_urls" escape="html"$></textarea> <mt:unless name="new_object"> <mt:if name="has_any_pinged_urls"> <div id="sent-tb"><a href="javascript:void(0)" onclick="listPreviousPings(); return false"><__trans phrase="View Previously Sent TrackBacks"></a></div> </mt:if> </mt:unless> </mtapp:setting> </mtapp:widget> </div> <mt:if name="object_type" eq="page"> <$MTApp:PageActions from="edit_page"$> <mt:else> <$MTApp:PageActions from="edit_entry"$> </mt:if> </mt:setvarblock> <mt:setvarblock name="js_include" append="1"> <!--// this MUST loaded after mt.js // --> <script type="text/javascript" src="<$mt:var name="static_uri"$>js/edit.js?v=<$mt:var name="mt_version_id" escape="url"$>"></script> </mt:setvarblock> <mt:if name="rich_editor"><mt:var name="rich_editor_tmpl"><mt:else><mt:include name="include/archetype_editor.tmpl"></mt:if> <mt:setvarblock name="html_head" append="1"> <script type="text/javascript"> /* <![CDATA[ */ Editor.strings.unsavedChanges = '<mt:if name="object_type"entry><__trans phrase="You have unsaved changes to this entry that will be lost." escape="js"><mt:else><__trans phrase="You have unsaved changes to this page that will be lost." escape="js"></mt:if>'; Editor.strings.enterEmailAddress = '<__trans phrase="Enter email address:" escape="js">'; Editor.strings.enterLinkAddress = '<__trans phrase="Enter the link address:" escape="js">'; Editor.strings.enterTextToLinkTo = '<__trans phrase="Enter the text to link to:" escape="js">'; /* ]]> */ </script> </mt:setvarblock> <mt:setvarblock name="html_head" append="1"> <script type="text/javascript" src="<$mt:var name="static_uri"$>js/tc/focus.js"></script> <script type="text/javascript" src="<$mt:var name="static_uri"$>js/tc/tagcomplete.js"></script> <script type="text/javascript" src="<$mt:var name="static_uri"$>js/tc/client.js"></script> <script type="text/javascript"> /* <![CDATA[ */ var cur_text_format = '<mt:var name="convert_breaks" escape="js">'; var customizable_fields = new Array(<mt:unless name="object_type" eq="page">'category',</mt:unless>'excerpt','keywords','tags','publishing','feedback'); var default_fields = new Array(); <mt:loop name="disp_prefs_default_fields"> default_fields.push('<mt:var name="name" escape="js">'); </mt:loop> var custom_fields = new Array(); <mt:unless name="object_type" eq="page"> <mt:if name="disp_prefs_show_category">custom_fields.push('category');</mt:if> </mt:unless> <mt:if name="disp_prefs_show_excerpt">custom_fields.push('excerpt');</mt:if> <mt:if name="disp_prefs_show_keywords">custom_fields.push('keywords');</mt:if> <mt:if name="disp_prefs_show_tags">custom_fields.push('tags');</mt:if> <mt:if name="disp_prefs_show_publishing">custom_fields.push('publishing');</mt:if> <mt:if name="disp_prefs_show_feedback">custom_fields.push('feedback');</mt:if> function savedEntryOptions(c) { var message = '<__trans phrase="Your entry screen preferences have been saved." escape="js">'; for (var i = 0; i < custom_fields.length; i++) { if (custom_fields[i].match( /^customfield_/ )) { message = '<__trans phrase="Your entry screen preferences have been saved. Please refresh the page to reorder the custom fields." escape="js">' } } showMsg(message, 'saved-prefs-msg', 'success'); } function saveEntryFieldOptions() { var frm = document.forms['display-options-form']; var entry_prefs = getByID('entry_prefs'); var mode; mode = entry_prefs.value; var custom_prefs = ''; var bar_position; for (var i = 0; i < frm.elements.length; i++) { var fld = frm.elements[i]; if (fld.name == 'bar_position') { if (fld.checked) bar_position = fld.value; } else if (fld.name == 'entry_prefs') { mode = fld.value; } else if (fld.name == 'custom_prefs') { if (!fld.disabled && fld.checked) custom_prefs += '&custom_prefs=' + fld.value; } } // TBD: we need to get the blog id from the selector control // itself var param = '__mode=save_entry_prefs' + '&_type=<mt:var name="object_type">' + '&blog_id=<mt:var name="blog_id">' + '&entry_prefs=' + mode + '&magic_token=<mt:var name="magic_token">' + '&bar_position=' + bar_position; if (mode == 'Custom') { param += custom_prefs; } var params = { uri: '<mt:var name="script_url">', method: 'POST', arguments: param, load: savedEntryOptions }; TC.Client.call(params); } function convertedText(c, result) { var form = document.forms['entry_form']; var response = eval('('+result+')'); if (response.error) { alert("Error: " + response.error); return; } form.text.value = response.result.text; form.text_more.value = response.result.text_more; cur_text_format = 'richtext'; TC.removeClassName(TC.elementOrId("editor-content"), "editor-plaintext"); app.setEditorIframeHTML(); } function changedTextFormat(sel) { var form = sel.form; var option = sel.options[sel.selectedIndex].value; if ((cur_text_format != 'richtext') && (option == 'richtext')) { // warn user that changing to richtext is not reversible (easily) if (!confirm("<__trans phrase="Are you sure you want to use the Rich Text editor?" escape="js">")) { // revert selection for (var i = 0; i < sel.options.length; i++) { if (sel.options[i].value == cur_text_format) sel.selectedIndex = i; } app.editor.focus(); return; } } var s = document.forms['entry_form'].convert_breaks; var key = s.options[s.selectedIndex].value; if (url = docs[key]) { if (url.indexOf('http://') == -1) url = HelpBaseURI + url; TC.removeClassName(getByID('formatting-help-link'), 'disabled'); } else { TC.addClassName(getByID('formatting-help-link'), 'disabled'); } if (cur_text_format == 'richtext') { // changing to plaintext editor TC.addClassName(TC.elementOrId("editor-content"), "editor-plaintext"); cur_text_format = option; app.editor.setMode('textarea'); app.editor.focus(); } else if (option == 'richtext') { app.saveHTML(false); // changing to richtext editor // convert existing format to richtext var param = { '__mode': 'convert_to_html', 'text': form.text.value, 'text_more': form.text_more.value, 'format': cur_text_format }; var params = { uri: '<mt:var name="script_url">', method: 'POST', arguments: param, load: convertedText }; TC.Client.call(params); } else { cur_text_format = option; app.editor.focus(); } } function setFieldGroup(selection) { var i, j, selected_fields, disable_fields, field_object; var entry_prefs = getByID('entry_prefs'); entry_prefs.value = selection; // set checkbox data based on which group was selected if (selection == 'Default') { selected_fields = default_fields; var bar_position = document.getElementById('bar_position_bottom'); if (bar_position) { bar_position.checked = true; setBarPosition(bar_position); } } else if (selection == 'Custom') { selected_fields = custom_fields; } // uncheck all the checkboxes for (i = 0; i < customizable_fields.length; i++) { field_object = TC.elementOrId("custom-prefs-"+customizable_fields[i]); if (field_object) field_object.checked = false; var div = TC.elementOrId(customizable_fields[i] + '-field'); if (div) TC.addClassName(div, 'hidden'); } // check only the checkboxes in the current set if (selected_fields) { for (i = 0; i < selected_fields.length; i++) { for (j = 0; j < customizable_fields.length; j++) { if (selected_fields[i] == customizable_fields[j]) { field_object = TC.elementOrId("custom-prefs-"+customizable_fields[j]); var hide = true; if (field_object) { hide = false; field_object.checked = true; } var div = TC.elementOrId(customizable_fields[j] + '-field'); if (div) { if (hide) TC.addClassName(div, 'hidden'); else TC.removeClassName(div, 'hidden'); } } } } setCustomFields(); } return false; } function setCustomFields() { var i = 0; // empty the custom fields array custom_fields = new Array(); // we loop over all customizable fields here (which includes // all the metadata fields). we want to hide the metadata (or // other fieldset, if we grow another customizable fieldset) // from view if all fields within it are hidden. alternatively, // if the user enables a field, the fieldset should be enabled. // add only the fields which are currently checked and enabled for (i = 0; i < customizable_fields.length; i++) { var hide = true; var field_object = TC.elementOrId("custom-prefs-"+customizable_fields[i]); if (field_object && field_object.checked && !field_object.disabled) { custom_fields.push(customizable_fields[i]); hide = false; } var div = TC.elementOrId(customizable_fields[i] + '-field'); if (div) { if (hide) TC.addClassName(div, 'hidden'); else TC.removeClassName(div, 'hidden'); } } var entry_prefs = getByID('entry_prefs'); entry_prefs.value = 'Custom'; return false; } var tag_delim = '<$mt:var name="auth_pref_tag_delim"$>'; function setDirty () { log.warn('deprecated function setDirty(), call app.setDirty instead'); app.setDirty(); } function clearDirty () { log.warn('deprecated function clearDirty(), call app.clearDirty instead'); app.clearDirty(); } // array of tag names var tagList; // raw structure of tags (hash of tag -> count) var tags; function rebasename(title) { if (!orig_basename) { dir_title = dirify(title.value); dir_title = dir_title.substring(0, <$mt:var name="basename_limit"$>); trimmed = dir_title.match(/^(.*[^_])/); if (trimmed && trimmed.length) { setElementValue('basename', trimmed[0]); } else { setElementValue('basename', ''); } } } RegExp.escape = (function() { var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\' ]; sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); return function(text) { return text.replace(sRE, '\\$1'); } })(); function tagSplit(str) { var delim = RegExp.escape(tag_delim); var delim_scan = new RegExp('^((([\'"])(.*?)\\3[^' + delim + ']*?|.*?)(' + delim + '\\s*|$))', ''); str = str.replace(/(^\s+|\s+$)/g, ''); var tags = []; while (str.length && str.match(delim_scan)) { str = str.substr(RegExp.$1.length); var tag = RegExp.$4 ? RegExp.$4 : RegExp.$2; tag = tag.replace(/(^\s+|\s+$)/g, ''); tag = tag.replace(/\s+/g, ' '); if (tag != '') tags.push(tag); } return tags; } document.onkeyup = function(e) { if (!e) e = window.event; if (e.ctrlKey) { if (e.keyCode == 80) { if (e.shiftKey) { getByID('status').value = 1; // ctrl-shift-p: unpublish } else { getByID('status').value = 2; // ctrl-p: publish } } if (e.keyCode == 85) { getByID('status').value = 1; // ctrl-u: unpublish } } }; var docs = new Array(); <mt:loop name="text_filters"> docs['<$mt:var name="filter_key"$>'] = '<$mt:var name="filter_docs"$>'; </mt:loop> function openTFDocs() { var s = document.forms['entry_form'].convert_breaks; var key = s.options[s.selectedIndex].value; if (url = docs[key]) { if (url.indexOf('http://') == -1) url = HelpBaseURI + url; window.open(url, 'manual', 'width=450,height=550,scrollbars=yes,status=yes,resizable=yes'); } else { return false; // return openManual('entries', 'entry_text_formatting'); } } function toggleFile() { var fld = getByID("basename"); if (fld) { fld.disabled = false; fld.focus(); var baseman = getByID("basename_manual"); if (baseman) baseman.value = "1"; var basewarn = getByID("basename-warning"); if (basewarn) basewarn.style.display = "block"; } var img = getByID("basename-lock"); if (img) img.style.display = 'none'; return false; } var orig_basename; var tbTableSelect; var cmtTableSelect; var autoTag; <mt:if name="tags_js"> tags = <$mt:var name="tags_js"$>; </mt:if> function init() { // setup tbTableSelect = new TC.TableSelect( "manage-trackbacks" ); tbTableSelect.rowSelect = true; cmtTableSelect = new TC.TableSelect( "manage-comments" ); cmtTableSelect.rowSelect = true; var basename = getByID("basename"); var basename_old = getByID("basename_old"); var title = getByID("title"); if (basename) { if (basename.value != '') {<mt:if name="reedit"> toggleFile();</mt:if> orig_basename = basename.value; }<mt:if name="reedit"> else { <mt:if name="id"> basename.value = basename_old.value; <mt:else> basename.value = dirify(title.value); </mt:if> } </mt:if> } <mt:if name="defer_tag_load">window.setTimeout("deferredTagLoad()", 500);<mt:else> <mt:if name="tags_js">initTags();</mt:if></mt:if> <mt:unless name="id">title.focus();</mt:unless> } <mt:if name="defer_tag_load"> function deferredTagLoad() { /* http://del.icio.us/feeds/json/tags/username */ TC.Client.call({ 'load': tagsLoaded, 'method': 'POST', 'uri': '<$mt:var name="mt_url"$>', 'arguments': { '__mode': 'js_tag_list', 'blog_id': '<$mt:var name="blog_id"$>', 'magic_token': '<$mt:var name="magic_token"$>'} }); } function tagsLoaded(c, result) { try { var x = eval('(' + result + ')'); if (x.error) { // suppress error. tag completion isn't critical return; } tags = x.result.tags; } catch (e) { } initTags(); } </mt:if> var tagPos = 0; function initTags() { /* browsers don't want to cache the tags field, so we use a hidden input field to cache them */ var t = getByID('tags-cache'); if ( t ) { log('tag cache:'+t.value); var v = getByID('tags'); if ( t.value ) v.value = t.value; DOM.addEventListener( v, "change", function() { log('caching tags'); t.value = v.value; } ); } if (!tags || tags.length == 0) return; tagList = []; for (var tag in tags) if ( tags.hasOwnProperty( tag ) ) tagList.push( tag ); autoTag = new TC.TagComplete("tags", tagList); autoTag.delimiter = tag_delim; } TC.attachLoadEvent( init ); function highlightSwitch(selection) { var descriptionObject = getByID('created_on-label'); var highlightObject = getByID('created_on-date'); if (highlightObject) { if (selection.value == 4) { highlightObject.className = 'highlight'; descriptionObject.innerHTML = '<__trans phrase="Publish On" escape="js">'; } else { highlightObject.className = 'default'; descriptionObject.innerHTML = '<__trans phrase="Publish Date" escape="js">'; } } return false; } Template.templates.autoSave = '<mt:section encode_js="1"> [# if ( saving ) { #] [#= trans("Auto-saving..." ) #] [# } else { #] [#= trans("Last auto-save at [_1]:[_2]:[_3]", hh, mm, ss ) #] [# } #] </mt:section>'; <mt:ignore> <__trans phrase="Remove"> <__trans phrase="Make primary"> </mt:ignore> function listPreviousPings () { window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=pinged_urls&entry_id=<TMPL_VAR NAME=ID>&blog_id=<TMPL_VAR NAME=BLOG_ID>', 'urls', 'width=400,height=400,resizable=yes,scrollbars=yes'); } /* ]]> */ </script> </mt:setvarblock> <mt:setvarblock name="html_body" append="1"> <mt:if name="dirty"> <script type="text/javascript"> /* <![CDATA[ */ MT.App.dirty = true; /* ]]> */ </script> </mt:if> <mt:include name="include/calendar.tmpl"> </mt:setvarblock> <mt:setvarblock name="html_body_footer"> <$mt:setvar name="show_display_options_link" value="1"$> <mtapp:widget id="display-options-widget" class="display-options-widget autolayout-flyout-smart hidden" label="<__trans phrase="Display Options">"> <form name="display-options-form" method="post" action="<mt:var name="script_url">"> <input type="hidden" id="entry_prefs" name="entry_prefs" value="<mt:if name="disp_prefs_default">Default<mt:else>Custom</mt:if>"> <mtapp:setting id="entry_fields" label="<__trans phrase="Fields">" label_class="display-options"> <ul> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-title" value="title" checked="checked" disabled="disabled" class="cb" /> <__trans phrase="Title"></label></li> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-body" value="body" checked="checked" disabled="disabled" class="cb" /> <__trans phrase="Body"></label></li> <li><label><input type="checkbox" onclick="setCustomFields(); return true;" name="custom_prefs" id="custom-prefs-tags" value="tags" <mt:if name="disp_prefs_show_tags"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Tags"></label></li> <mt:if name="object_type" ne="page"> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-category" value="category" onclick="setCustomFields(); return true"<mt:if name="disp_prefs_show_category"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Category"></label></li> </mt:if> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-excerpt" value="excerpt" onclick="setCustomFields(); return true"<mt:if name="disp_prefs_show_excerpt"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Excerpt"></label></li> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-keywords" value="keywords" onclick="setCustomFields(); return true"<mt:if name="disp_prefs_show_keywords"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Keywords"></label></li> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-publishing" value="publishing" onclick="setCustomFields(); return true"<mt:if name="disp_prefs_show_publishing"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Publishing"></label></li> <li><label><input type="checkbox" name="custom_prefs" id="custom-prefs-feedback" value="feedback" onclick="setCustomFields(); return true"<mt:if name="disp_prefs_show_feedback"> checked="checked"</mt:if> class="cb" /> <__trans phrase="Feedback"></label></li> </ul> </mtapp:setting> <mtapp:setting id="action_bars" label="<__trans phrase="Actions">" label_class="display-options"> <ul class="action-button-options"> <li><label><input type="radio" name="bar_position" id="bar_position_top" value="Top"<mt:unless name="position_actions_both"><mt:if name="position_actions_top"> checked="checked"</mt:if></mt:unless> onclick="setBarPosition(this)" class="rb" /> <__trans phrase="Top"></label></li> <li><label><input type="radio" name="bar_position" id="bar_position_both" value="Both"<mt:if name="position_actions_both"> checked="checked"</mt:if> onclick="setBarPosition(this)" class="rb" /> <__trans phrase="Both"></label></li> <li><label><input type="radio" name="bar_position" id="bar_position_bottom" value="Bottom"<mt:unless name="position_actions_both"><mt:if name="position_actions_bottom"> checked="checked"</mt:if></mt:unless> onclick="setBarPosition(this)" class="rb" /> <__trans phrase="Bottom"></label></li> </ul> </mtapp:setting> <mtapp:setting id="reset_display_options" label="<__trans phrase="Reset display options">" label_class="display-options" show_label="0"> <a href="javascript:void(0)" onclick="return setFieldGroup('Default');" title="<__trans phrase="Reset display options to blog defaults">" ><__trans phrase="Reset defaults"></a> </mtapp:setting> <div class="actions-bar display-options-actions-bar buttons"> <div class="actions-bar-inner"> <a href="javascript:void(0)" onclick="saveEntryFieldOptions();" mt:command="close-flyout" title="<__trans phrase="Save display options">" ><__trans phrase="OK"></a> <a href="javascript:void(0)" mt:command="close-flyout" title="<__trans phrase="Close display options">" ><__trans phrase="Cancel"></a> </div> </div> </form> </mtapp:widget> </mt:setvarblock> <mt:unless name="new_object"> <mt:setvarblock name="object_nav"> <ul class="object-nav"> <li id="previous-link"><mt:if name="previous_entry_id"><a href="<$mt:var name="script_url"$>?__mode=view&_type=<$mt:var name="object_type" lower_case="1"$>&id=<$mt:var name="previous_entry_id"$>&blog_id=<$mt:var name="blog_id"$>"><__trans phrase="Previous"></a><mt:else><span><__trans phrase="Previous"></span></mt:if></li> <li id="manage-link"><a href="<$mt:var name="script_url"$>?__mode=list_<$mt:var name="object_type" lower_case="1"$>&blog_id=<$mt:var name="blog_id"$>"><$mt:var name="manage_container_label"$></a></li> <li id="next-link"><mt:if name="next_entry_id"><a href="<$mt:var name="script_url"$>?__mode=view&_type=<$mt:var name="object_type" lower_case="1"$>&id=<$mt:var name="next_entry_id"$>&blog_id=<$mt:var name="blog_id"$>"><__trans phrase="Next"></a><mt:else><span><__trans phrase="Next"></span></mt:if></li> </ul> </mt:setvarblock> </mt:unless> <mt:include name="include/header.tmpl" id="header_include"> <mt:include name="include/actions_bar.tmpl" hide_pager="1"> <mtapp:setting id="title" label="<__trans phrase="Title">" label_class="top-label" help_page="entries" help_section="entry_title"> <input name="title" id="title" tabindex="1" value="<$mt:var name="title" escape="html"$>" maxlength="255" mt:watch-change="1" onkeyup="rebasename(this)" /> </mtapp:setting> <div id="editor"> <div id="editor-inner" class="editor-header pkg" mt:delegate="tab-container"> <div class="tab selected-tab" mt:command="set-editor-content" mt:tab="content"> <label><a href="javascript:void(0);"><__trans phrase="Body"></a></label> </div> <div class="tab" mt:command="set-editor-extended" mt:tab="extended"> <label><a href="javascript:void(0);"><__trans phrase="Extended"></a></label> </div> <!-- text filters --> <div id="field-convert_breaks"> <__trans phrase="Format:"> <select name="convert_breaks" id="convert_breaks" tabindex="2" onchange="changedTextFormat(this)"> <mt:loop name="text_filters"> <option value="<mt:var name="filter_key">"<mt:if name="filter_selected"> selected="selected"</mt:if>><mt:var name="filter_label"></option> </mt:loop> </select> <$mt:setvar name="show_formatting_help" value="1"$> <mt:if name="convert_breaks" eq="richtext"> <$mt:setvar name="show_formatting_help" value="0"$> </mt:if> <mt:if name="convert_breaks" eq="0"> <$mt:setvar name="show_formatting_help" value="0"$> </mt:if> <mt:if name="convert_breaks" eq="__default__"> <$mt:setvar name="show_formatting_help" value="0"$> </mt:if> <a href="#" onclick="openTFDocs(); return false" id="formatting-help-link" class="help-link<mt:unless name="show_formatting_help"> disabled</mt:unless>">?</a> </div> </div> </div> <mt:include name="include/editor.tmpl"> <mt:setvarblock name="show_metadata"><$mt:var name="disp_prefs_show_tags"$><mt:unless name="object_type" eq="page"><$mt:var name="disp_prefs_show_category"></mt:unless><$mt:var name="disp_prefs_show_excerpt"$><$mt:var name="disp_prefs_show_keywords"$></mtsetvarblock> <mt:if name="auth_pref_tag_delim_comma"> <$mt:setvar name="tags_hint" value="<__trans phrase="(comma-delimited list)">"$> <mt:else> <mt:if name="auth_pref_tag_delim_space"> <$mt:setvar name="tags_hint" value="<__trans phrase="(space-delimited list)">"$> <mt:else> <mt:setvarblock name="tags_hint"> <__trans phrase="(delimited by '[_1]')" params="<$mt:var name="auth_pref_tag_delim"$>"> </mt:setvarblock> </mt:if> </mt:if> <mtapp:setting id="tags" shown="$disp_prefs_show_tags" label="<__trans phrase="Tags">" label_class="top-label" help_page="entries" help_section="entry_tags"> <div class="textarea-wrapper"> <input name="tags" id="tags" class="full-width" tabindex="5" value="<$mt:var name="tags" escape="html"$>" mt:watch-change="1" autocomplete="off" /> <input type="hidden" name="_ignore_tags" id="tags-cache" value="<$mt:var name="tags" escape="html"$>" /> </div> <!-- FIXME - move this styling to the ie hacks css file --> <!--[if lte IE 6.5]><div style="position:relative;"><![endif]--> <div id="tags_completion"></div> <!--[if lte IE 6.5]></div><![endif]--> </mtapp:setting> <mtapp:setting id="excerpt" shown="$disp_prefs_show_excerpt" label="<__trans phrase="Excerpt">" label_class="top-label" help_page="entries" help_section="excerpt"> <textarea name="excerpt" id="excerpt" class="full-width short" tabindex="7" cols="" rows="" mt:watch-change="1"><$mt:var name="excerpt" escape="html"$></textarea> </mtapp:setting> <mtapp:setting id="keywords" shown="$disp_prefs_show_keywords" label="<__trans phrase="Keywords">" label_class="top-label" help_page="entries" help_section="keywords"> <div class="textarea-wrapper"> <input name="keywords" id="keywords" class="full-width" tabindex="8" value="<$mt:var name="keywords" escape="html"$>" mt:watch-change="1" autocomplete="off" /> </div> </mtapp:setting> <mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1"> <div id="quickpost"> <mt:var name="quickpost_js"> </div> <mt:setvarblock name="form_footer"> </form> </mt:setvarblock> <mt:include name="include/footer.tmpl" id="footer_include">