Add options to customize the browser title format

This commit is contained in:
Kijin Sung 2016-05-09 22:39:19 +09:00
parent f25e685209
commit 9bdc30b325
11 changed files with 79 additions and 18 deletions

View file

@ -7,6 +7,27 @@
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procAdminUpdateSEO" />
<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/config_seo/1" />
<div class="x_control-group">
<label class="x_control-label" for="seo_main_title">{$lang->seo_main_title}</label>
<div class="x_controls">
<input type="text" name="seo_main_title" id="seo_main_title" value="{$seo_main_title}" style="min-width: 80%" class="lang_code" />
<p class="x_help-block">{$lang->about_seo_main_title}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="seo_subpage_title">{$lang->seo_subpage_title}</label>
<div class="x_controls">
<input type="text" name="seo_subpage_title" id="seo_subpage_title" value="{$seo_subpage_title}" style="min-width: 80%" class="lang_code" />
<p class="x_help-block">{$lang->about_seo_subpage_title}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="seo_document_title">{$lang->seo_document_title}</label>
<div class="x_controls">
<input type="text" name="seo_document_title" id="seo_document_title" value="{$seo_document_title}" style="min-width: 80%" class="lang_code" />
<p class="x_help-block">{$lang->about_seo_document_title}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="site_meta_keywords">{$lang->site_meta_keywords}</label>
<div class="x_controls">

View file

@ -1627,7 +1627,7 @@ jQuery(function($){
$textareas.each(function(){
var $this = $(this);
var value = data.langs[$this.data('lang')];
var pattern = /^\$user_lang->/;
var pattern = /^\$user_lang-(?:>|&(?:amp;)?gt;)/;
if(pattern.test(value)){
$this.val('').data('value', '');
@ -1911,7 +1911,7 @@ jQuery(function($){
//var $displayInput = $this.siblings('.lang_code');
if($displayInput.data('active')){
$multilingualWindow.trigger('before-open.g11n', $displayInput.prev('.lang_code').val().replace('$user_lang->', ''));
$multilingualWindow.trigger('before-open.g11n', $displayInput.prev('.lang_code').val().replace(/\$user_lang-(?:>|&(?:amp;)?gt;)/, ''));
}else{
$multilingualWindow.trigger('before-open.g11n');
}
@ -1964,7 +1964,7 @@ jQuery(function($){
// load value
function loadValue(){
reset();
var pattern = /^\$user_lang->/;
var pattern = /^\$user_lang-(?:>|&(?:amp;)?gt;)/;
function on_complete2(data){
if(!data || !data.langs) return;
@ -1977,7 +1977,7 @@ jQuery(function($){
if(pattern.test($displayInput.val())){
$.exec_json('module.getModuleAdminLangCode', {
'name': $displayInput.val().replace('$user_lang->', ''),
'name': $displayInput.val().replace(pattern, ''),
'mid': current_url.getQuery('mid')
}, on_complete2);
}