Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/css/ |
| [Home] [System Details] [Kill Me] |
css/sidebyside.css000064400000002366151165074400010204 0ustar00/**
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
.sidebyside .outer-panel {
float: left;
width: 50%;
}
.sidebyside #left-panel .inner-panel {
padding: 0 10px 0 0;
}
.sidebyside #right-panel .inner-panel {
padding: 0 0 0 10px;
}
.sidebyside .full-width {
float: none !important;
width: 100% !important;
}
.sidebyside .full-width .inner-panel {
padding: 0 !important;
}
#reference-association, #target-association {
width: 100%;
height: 1500px;
overflow-y: auto;
border: 0 !important;
}
.target-text {
float: left;
width: 30%;
}
/* RTL overrides */
html[dir=rtl] .sidebyside .outer-panel {
float: right;
}
html[dir=rtl] .sidebyside #left-panel .inner-panel {
padding: 0 0 0 10px;
}
html[dir=rtl] .sidebyside #right-panel .inner-panel {
padding: 0 10px 0 0;
}
html[dir=rtl] .sidebyside .full-width .inner-panel {
padding: 0 !important;
}
html[dir=rtl] .target-text {
float: right;
}
/* Responsive layout */
@media (max-width: 767px) {
.sidebyside .outer-panel {
float: none;
width: 100%;
}
.sidebyside #left-panel .inner-panel {
padding: 0;
}
.sidebyside #right-panel .inner-panel {
padding: 0;
}
}
js/sidebyside-uncompressed.js000064400000032103151165074400012351
0ustar00/**
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function($) {
$('#toolbar-target').hide();
$('#toolbar-copy').hide();
// Save button actions, replacing the default Joomla.submitbutton() with
custom function.
Joomla.submitbutton = function(task)
{
// Using close button, normal joomla submit.
if (task === 'association.cancel')
{
Joomla.submitform(task);
}
else if(task === 'copy')
{
Joomla.loadingLayer('show');
var targetLang =
document.getElementById('target-association').getAttribute('data-language'),
referlangInput =
window.frames['reference-association'].document.getElementById('jform_language');
// Set target language, to get correct content language in the copy
referlangInput.removeAttribute('disabled');
referlangInput.value = targetLang;
window.frames['reference-association'].Joomla.submitbutton(document.getElementById('adminForm').getAttribute('data-associatedview')
+ '.save2copy');
}
// Undo association
else if (task === 'undo-association')
{
var reference =
document.getElementById('reference-association');
var target =
document.getElementById('target-association');
var referenceId = reference.getAttribute('data-id');
var referenceLang =
reference.getAttribute('data-language').replace(/-/,'_');
var targetId = target.getAttribute('data-id');
var targetLang =
target.getAttribute('data-language').replace(/-/,'_');
reference = $(reference).contents();
target = $(target).contents();
// Remove it on the reference
// - For modal association selectors.
reference.find('#jform_associations_' + targetLang +
'_id').val('');
reference.find('#jform_associations_' + targetLang +
'_name').val('');
// - For chosen association selectors (menus).
reference.find('#jform_associations_' + targetLang +
'_chzn').remove();
reference.find('#jform_associations_' +
targetLang).val('').change().chosen();
var lang = '';
// Remove it on the target
$('#jform_itemlanguage option').each(function()
{
lang = $(this).val().split('|')[0];
if (typeof lang !== 'undefined')
{
lang = lang.replace(/-/,'_');
// - For modal association selectors.
target.find('#jform_associations_' + lang +
'_id').val('');
// - For chosen association selectors (menus).
target.find('#jform_associations_' + lang +
'_chzn').remove();
target.find('#jform_associations_' +
lang).val('').change().chosen();
}
});
// Same as above but reference language is not in the selector
// - For modal association selectors.
target.find('#jform_associations_' + referenceLang +
'_id').val('');
target.find('#jform_associations_' + referenceLang +
'_name').val('');
// - For chosen association selectors (menus).
target.find('#jform_associations_' + referenceLang +
'_chzn').remove();
target.find('#jform_associations_' +
referenceLang).val('').change().chosen();
// Reset switcher after removing association
var currentSwitcher = $('#jform_itemlanguage').val();
var currentLang = targetLang.replace(/_/,'-');
$('#jform_itemlanguage option[value=\"' + currentSwitcher
+ '\"]').val(currentLang + ':0:add');
$('#jform_itemlanguage').val('').change();
$('#jform_itemlanguage').trigger('liszt:updated');
// Save one of the items to confirm action
Joomla.submitbutton('reference');
}
// Saving target or reference, send the save action to the
target/reference iframe.
else
{
// We need to re-enable the language field to save.
$('#' + task +
'-association').contents().find('#jform_language').attr('disabled',
false);
window.frames[task +
'-association'].Joomla.submitbutton(document.getElementById('adminForm').getAttribute('data-associatedview')
+ '.apply');
}
return false;
};
// Preload Joomla loading layer.
Joomla.loadingLayer('load');
// Attach behaviour to toggle button.
$(document).on('click', '#toogle-left-panel',
function()
{
var referenceHide = this.getAttribute('data-hide-reference');
var referenceShow = this.getAttribute('data-show-reference');
if ($(this).text() === referenceHide)
{
$(this).text(referenceShow);
}
else
{
$(this).text(referenceHide);
}
$('#left-panel').toggle();
$('#right-panel').toggleClass('full-width');
});
// Attach behaviour to language selector change event.
$(document).on('change', '#jform_itemlanguage',
function() {
var target = document.getElementById('target-association');
var selected = $(this).val();
// Populate the data attributes and load the the edit page in target
frame.
if (selected !== '' && typeof selected !==
'undefined')
{
target.setAttribute('data-action',
selected.split(':')[2]);
target.setAttribute('data-id',
selected.split(':')[1]);
target.setAttribute('data-language',
selected.split(':')[0]);
// Iframe load start, show Joomla loading layer.
Joomla.loadingLayer('show');
// Load the target frame.
target.src = target.getAttribute('data-editurl') +
'&task=' + target.getAttribute('data-item') +
'.' + target.getAttribute('data-action') +
'&id=' + target.getAttribute('data-id');
}
// Reset the data attributes and no item to load.
else
{
$('#toolbar-target').hide();
$('#toolbar-copy').hide();
$('#select-change').addClass("hidden");
$('#remove-assoc').addClass("hidden");
target.setAttribute('data-action', '');
target.setAttribute('data-id', '0');
target.setAttribute('data-language', '');
target.src = '';
}
});
// Attach behaviour to reference frame load event.
$('#reference-association').on('load', function() {
// Waiting until the reference has loaded before loading the target to
avoid race conditions
var targetURL = Joomla.getOptions('targetSrc', false);
if (targetURL)
{
targetURL =
targetURL.split('&').join('&');
document.getElementById('target-association').setAttribute('src',
targetURL);
Joomla.loadOptions({'targetSrc': false});
return;
}
// Load Target Pane AFTER reference pane has loaded to prevent session
conflict with checkout
document.getElementById('target-association').setAttribute('src',
document.getElementById('target-association').getAttribute('src'));
// If copy button used
if ($(this).contents().find('#jform_id').val() !==
this.getAttribute('data-id'))
{
var target = document.getElementById('target-association');
target.src = target.getAttribute('data-editurl') +
'&task=' + target.getAttribute('data-item') +
'.edit' + '&id=' +
$(this).contents().find('#jform_id').val();
this.src = this.getAttribute('data-editurl') +
'&task=' + this.getAttribute('data-item') +
'.edit' + '&id=' +
this.getAttribute('data-id');
}
var reference = $(this).contents();
// Disable language field.
reference.find('#jform_language_chzn').remove();
reference.find('#jform_language').attr('disabled',
true).chosen();
// Remove modal buttons on the reference
reference.find('#associations').find('.btn').remove();
var parse = '';
$('#jform_itemlanguage option').each(function()
{
parse = $(this).val().split(':');
if (typeof parse[0] !== 'undefined')
{
// - For modal association selectors.
langAssociation = parse[0].replace(/-/,'_');
if (reference.find('#jform_associations_' + langAssociation +
'_id').val() == '')
{
reference.find('#jform_associations_' + langAssociation +
'_name')
.val(document.getElementById('reference-association').getAttribute('data-no-assoc'));
}
}
});
// Iframe load finished, hide Joomla loading layer.
Joomla.loadingLayer('hide');
});
// Attach behaviour to target frame load event.
$('#target-association').on('load', function() {
// We need to check if we are not loading a blank iframe.
if (this.getAttribute('src') != '')
{
$('#toolbar-target').show();
$('#toolbar-copy').show();
$('#select-change').removeClass("hidden");
var targetLanguage = this.getAttribute('data-language');
var targetId = this.getAttribute('data-id');
var targetLoadedId =
$(this).contents().find('#jform_id').val() || '0';
// Remove modal buttons on the target
$(this).contents().find('a[href=\"#associations\"]').parent().find('.btn').remove();
$(this).contents().find('#associations').find('.btn').remove();
// Always show General tab first if associations tab is selected on the
reference
if
($(this).contents().find('#associations').hasClass('active'))
{
$(this).contents().find('a[href=\"#associations\"]').parent().removeClass('active');
$(this).contents().find('#associations').removeClass('active');
$(this).contents().find('.nav-tabs').find('li').first().addClass('active');
$(this).contents().find('.tab-content').find('.tab-pane').first().addClass('active');
}
// Update language field with the selected language and them disable it.
$(this).contents().find('#jform_language_chzn').remove();
$(this).contents().find('#jform_language').val(targetLanguage).change().attr('disabled',
true).chosen();
// If we are creating a new association (before save) we need to add the
new association.
if (targetLoadedId == '0')
{
document.getElementById('select-change-text').innerHTML =
document.getElementById('select-change').getAttribute('data-select');
}
// If we are editing an association.
else
{
// Show change language button
document.getElementById('select-change-text').innerHTML =
document.getElementById('select-change').getAttribute('data-change');
$('#remove-assoc').removeClass("hidden");
$('#toolbar-copy').hide();
// Add the id to list of items to check in on close.
var currentIdList =
document.getElementById('target-id').value;
var updatedList = currentIdList == '' ? targetLoadedId :
currentIdList + ',' + targetLoadedId;
document.getElementById('target-id').value = updatedList;
// If we created a new association (after save).
if (targetLoadedId != targetId)
{
// Refresh the language selector with the new id (used after save).
$('#jform_itemlanguage option[value^=\"' +
targetLanguage + ':' + targetId +
':add\"]').val(targetLanguage + ':' +
targetLoadedId + ':edit');
// Update main frame data-id attribute (used after save).
this.setAttribute('data-id', targetLoadedId);
this.setAttribute('data-action', 'edit');
}
// Update the reference item associations tab.
var reference =
document.getElementById('reference-association');
var languageCode = targetLanguage.replace(/-/, '_');
var referenceTitle = reference.getAttribute('data-title');
var title = $(this).contents().find('#jform_' +
referenceTitle).val();
// - For modal association selectors.
$(reference).contents().find('#jform_associations_' +
languageCode + '_id').val(targetLoadedId);
$(reference).contents().find('#jform_associations_' +
languageCode + '_name').val(title);
// - For chosen association selectors (menus).
$(reference).contents().find('#jform_associations_' +
languageCode + '_chzn').remove();
$(reference).contents().find('#jform_associations_' +
languageCode).append('<option value=\"'+ targetLoadedId +
'\">' + title + '</option>');
$(reference).contents().find('#jform_associations_' +
languageCode).val(targetLoadedId).change().chosen();
}
// Update the target item associations tab.
var reference =
document.getElementById('reference-association');
var referenceId = reference.getAttribute('data-id');
var languageCode =
reference.getAttribute('data-language').replace(/-/,
'_');
var target =
document.getElementById('target-association');
var targetTitle = target.getAttribute('data-title');
var title = reference.getAttribute('data-title-value');
var target = $(this).contents();
// - For modal association selectors.
target.find('#jform_associations_' + languageCode +
'_id').val(referenceId);
target.find('#jform_associations_' + languageCode +
'_name').val(title);
// - For chosen association selectors (menus).
target.find('#jform_associations_' + languageCode +
'_chzn').remove();
var chznField = target.find('#jform_associations_' +
languageCode);
chznField.append('<option value=\"'+ referenceId +
'\">' + title + '</option>');
chznField.val(referenceId).change().chosen();
var parse, langAssociation;
$('#jform_itemlanguage option').each(function()
{
parse = $(this).val().split(':');
if (typeof parse[1] !== 'undefined' && parse[1] !==
'0')
{
// - For modal association selectors.
langAssociation = parse[0].replace(/-/,'_');
target.find('#jform_associations_' + langAssociation +
'_id').val(parse[1]);
// - For chosen association selectors (menus).
target.find('#jform_associations_' + langAssociation +
'_chzn').remove();
chznField = target.find('#jform_associations_' +
langAssociation);
chznField.append('<option value=\"'+ parse[1] +
'\"></option>');
chznField.val(parse[1]).change().chosen();
}
});
// Iframe load finished, hide Joomla loading layer.
Joomla.loadingLayer('hide');
}
});
});
js/sidebyside.js000064400000016221151165074410007650
0ustar00jQuery(document).ready(function(u){u("#toolbar-target").hide(),u("#toolbar-copy").hide(),Joomla.submitbutton=function(t){if("association.cancel"===t)Joomla.submitform(t);else
if("copy"===t){Joomla.loadingLayer("show");var
e=document.getElementById("target-association").getAttribute("data-language"),a=window.frames["reference-association"].document.getElementById("jform_language");a.removeAttribute("disabled"),a.value=e,window.frames["reference-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".save2copy")}else
if("undo-association"===t){var
i=document.getElementById("reference-association"),o=document.getElementById("target-association"),n=(i.getAttribute("data-id"),i.getAttribute("data-language").replace(/-/,"_"));o.getAttribute("data-id"),e=o.getAttribute("data-language").replace(/-/,"_");i=u(i).contents(),o=u(o).contents(),i.find("#jform_associations_"+e+"_id").val(""),i.find("#jform_associations_"+e+"_name").val(""),i.find("#jform_associations_"+e+"_chzn").remove(),i.find("#jform_associations_"+e).val("").change().chosen();var
s="";u("#jform_itemlanguage
option").each(function(){void
0!==(s=u(this).val().split("|")[0])&&(s=s.replace(/-/,"_"),o.find("#jform_associations_"+s+"_id").val(""),o.find("#jform_associations_"+s+"_chzn").remove(),o.find("#jform_associations_"+s).val("").change().chosen())}),o.find("#jform_associations_"+n+"_id").val(""),o.find("#jform_associations_"+n+"_name").val(""),o.find("#jform_associations_"+n+"_chzn").remove(),o.find("#jform_associations_"+n).val("").change().chosen();var
d=u("#jform_itemlanguage").val(),r=e.replace(/_/,"-");u('#jform_itemlanguage
option[value="'+d+'"]').val(r+":0:add"),u("#jform_itemlanguage").val("").change(),u("#jform_itemlanguage").trigger("liszt:updated"),Joomla.submitbutton("reference")}else
u("#"+t+"-association").contents().find("#jform_language").attr("disabled",!1),window.frames[t+"-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".apply");return!1},Joomla.loadingLayer("load"),u(document).on("click","#toogle-left-panel",function(){var
t=this.getAttribute("data-hide-reference"),e=this.getAttribute("data-show-reference");u(this).text()===t?u(this).text(e):u(this).text(t),u("#left-panel").toggle(),u("#right-panel").toggleClass("full-width")}),u(document).on("change","#jform_itemlanguage",function(){var
t=document.getElementById("target-association"),e=u(this).val();""!==e&&void
0!==e?(t.setAttribute("data-action",e.split(":")[2]),t.setAttribute("data-id",e.split(":")[1]),t.setAttribute("data-language",e.split(":")[0]),Joomla.loadingLayer("show"),t.src=t.getAttribute("data-editurl")+"&task="+t.getAttribute("data-item")+"."+t.getAttribute("data-action")+"&id="+t.getAttribute("data-id")):(u("#toolbar-target").hide(),u("#toolbar-copy").hide(),u("#select-change").addClass("hidden"),u("#remove-assoc").addClass("hidden"),t.setAttribute("data-action",""),t.setAttribute("data-id","0"),t.setAttribute("data-language",""),t.src="")}),u("#reference-association").on("load",function(){var
t=Joomla.getOptions("targetSrc",!1);if(t)return
t=t.split("&").join("&"),document.getElementById("target-association").setAttribute("src",t),void
Joomla.loadOptions({targetSrc:!1});if(document.getElementById("target-association").setAttribute("src",document.getElementById("target-association").getAttribute("src")),u(this).contents().find("#jform_id").val()!==this.getAttribute("data-id")){var
e=document.getElementById("target-association");e.src=e.getAttribute("data-editurl")+"&task="+e.getAttribute("data-item")+".edit&id="+u(this).contents().find("#jform_id").val(),this.src=this.getAttribute("data-editurl")+"&task="+this.getAttribute("data-item")+".edit&id="+this.getAttribute("data-id")}var
a=u(this).contents();a.find("#jform_language_chzn").remove(),a.find("#jform_language").attr("disabled",!0).chosen(),a.find("#associations").find(".btn").remove();var
i="";u("#jform_itemlanguage
option").each(function(){void
0!==(i=u(this).val().split(":"))[0]&&(langAssociation=i[0].replace(/-/,"_"),""==a.find("#jform_associations_"+langAssociation+"_id").val()&&a.find("#jform_associations_"+langAssociation+"_name").val(document.getElementById("reference-association").getAttribute("data-no-assoc")))}),Joomla.loadingLayer("hide")}),u("#target-association").on("load",function(){if(""!=this.getAttribute("src")){u("#toolbar-target").show(),u("#toolbar-copy").show(),u("#select-change").removeClass("hidden");var
t=this.getAttribute("data-language"),e=this.getAttribute("data-id"),a=u(this).contents().find("#jform_id").val()||"0";if(u(this).contents().find('a[href="#associations"]').parent().find(".btn").remove(),u(this).contents().find("#associations").find(".btn").remove(),u(this).contents().find("#associations").hasClass("active")&&(u(this).contents().find('a[href="#associations"]').parent().removeClass("active"),u(this).contents().find("#associations").removeClass("active"),u(this).contents().find(".nav-tabs").find("li").first().addClass("active"),u(this).contents().find(".tab-content").find(".tab-pane").first().addClass("active")),u(this).contents().find("#jform_language_chzn").remove(),u(this).contents().find("#jform_language").val(t).change().attr("disabled",!0).chosen(),"0"==a)document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-select");else{document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-change"),u("#remove-assoc").removeClass("hidden"),u("#toolbar-copy").hide();var
i=document.getElementById("target-id").value,o=""==i?a:i+","+a;document.getElementById("target-id").value=o,a!=e&&(u('#jform_itemlanguage
option[value^="'+t+":"+e+':add"]').val(t+":"+a+":edit"),this.setAttribute("data-id",a),this.setAttribute("data-action","edit"));var
n=document.getElementById("reference-association"),s=t.replace(/-/,"_"),d=n.getAttribute("data-title"),r=u(this).contents().find("#jform_"+d).val();u(n).contents().find("#jform_associations_"+s+"_id").val(a),u(n).contents().find("#jform_associations_"+s+"_name").val(r),u(n).contents().find("#jform_associations_"+s+"_chzn").remove(),u(n).contents().find("#jform_associations_"+s).append('<option
value="'+a+'">'+r+"</option>"),u(n).contents().find("#jform_associations_"+s).val(a).change().chosen()}var
c,l=(n=document.getElementById("reference-association")).getAttribute("data-id");s=n.getAttribute("data-language").replace(/-/,"_"),(c=document.getElementById("target-association")).getAttribute("data-title"),r=n.getAttribute("data-title-value");(c=u(this).contents()).find("#jform_associations_"+s+"_id").val(l),c.find("#jform_associations_"+s+"_name").val(r),c.find("#jform_associations_"+s+"_chzn").remove();var
m,g,f=c.find("#jform_associations_"+s);f.append('<option
value="'+l+'">'+r+"</option>"),f.val(l).change().chosen(),u("#jform_itemlanguage
option").each(function(){void
0!==(m=u(this).val().split(":"))[1]&&"0"!==m[1]&&(g=m[0].replace(/-/,"_"),c.find("#jform_associations_"+g+"_id").val(m[1]),c.find("#jform_associations_"+g+"_chzn").remove(),(f=c.find("#jform_associations_"+g)).append('<option
value="'+m[1]+'"></option>'),f.val(m[1]).change().chosen())}),Joomla.loadingLayer("hide")}})});