mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 16:24:43 +03:00
Move js code which auto close a window in a sepate file
This commit is contained in:
parent
3088481d6d
commit
a671caeb79
27
src/mibew/styles/pages/default/js/autoclose.js
Normal file
27
src/mibew/styles/pages/default/js/autoclose.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*!
|
||||||
|
* This file is a part of Mibew Messenger.
|
||||||
|
*
|
||||||
|
* Copyright 2005-2014 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function (window) {
|
||||||
|
if (window.opener && window.opener.location) {
|
||||||
|
window.opener.location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
window.close();
|
||||||
|
}, 1500);
|
||||||
|
})(window);
|
@ -3,12 +3,7 @@
|
|||||||
{{#if saved}}
|
{{#if saved}}
|
||||||
{{l10n "Address {0} is blocked for a specified number of days." address}}
|
{{l10n "Address {0} is blocked for a specified number of days." address}}
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript" src="{{asset "@CurrentStyle/js/autoclose.js"}}"></script>
|
||||||
if(window.opener && window.opener.location) {
|
|
||||||
window.opener.location.reload();
|
|
||||||
}
|
|
||||||
setTimeout( (function() { window.close(); }), 1500 );
|
|
||||||
//--></script>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{l10n "Here you can block malicious visitors that affect your work with spam messages."}}
|
{{l10n "Here you can block malicious visitors that affect your work with spam messages."}}
|
||||||
|
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
{{#override "content"}}
|
{{#override "content"}}
|
||||||
{{#if saved}}
|
{{#if saved}}
|
||||||
{{l10n "Saved"}}
|
{{l10n "Saved"}}
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript" src="{{asset "@CurrentStyle/js/autoclose.js"}}"></script>
|
||||||
if(window.opener && window.opener.location) {
|
|
||||||
window.opener.location.reload();
|
|
||||||
}
|
|
||||||
setTimeout( (function() { window.close(); }), 1500 );
|
|
||||||
//--></script>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if key}}
|
{{#if key}}
|
||||||
{{l10n "Edit an existing message."}}
|
{{l10n "Edit an existing message."}}
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
{{#if saved}}
|
{{#if saved}}
|
||||||
{{l10n "Your translation is saved."}}
|
{{l10n "Your translation is saved."}}
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript" src="{{asset "@CurrentStyle/js/autoclose.js"}}"></script>
|
||||||
if(window.opener && window.opener.location) {
|
|
||||||
window.opener.location.reload();
|
|
||||||
}
|
|
||||||
setTimeout( (function() { window.close(); }), 1500 );
|
|
||||||
//--></script>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{l10n "Enter your translation."}}
|
{{l10n "Enter your translation."}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user