This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
21,964 additions
and
137,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 26 additions & 45 deletions
71
dist/agosms-1.0.59/media/com_agosms/js/admin-agosms-button-default.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,26 @@ | ||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
(function () { | ||
"use strict"; | ||
document.addEventListener('DOMContentLoaded', function () { | ||
const cordsTextField = document.getElementById("jform_paramsmodal_cords_map"); | ||
const unique = cordsTextField.getAttribute('data-unique'); | ||
window['mymap' + unique] = L.map('mapid' + unique).setView([50.27264, 7.26469], 3); | ||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(window['mymap' + unique]); | ||
window['mymap' + unique].on('click', onMapClick); | ||
var marker = L.marker([50.28, 7.27]).addTo(window['mymap' + unique]).bindPopup(Joomla.JText._('COM_AGOSMS_BUTTON_DEFAULT_POPUP_PROMPT')).openPopup(); | ||
cordsTextField.value = "50.28, 7.27"; | ||
function onMapClick(e) { | ||
const cordsTextField = document.getElementById("jform_paramsmodal_cords_map"); | ||
if (cordsTextField) { | ||
cordsTextField.value = e.latlng.lat + ', ' + e.latlng.lng; | ||
var lat = (e.latlng.lat); | ||
var lng = (e.latlng.lng); | ||
var newLatLng = new L.LatLng(lat, lng); | ||
marker.setLatLng(newLatLng); | ||
} | ||
} | ||
|
||
var parts = window.location.search.substr(1).split("&"); | ||
var $_GET = {}; | ||
for (var i = 0; i < parts.length; i++) { | ||
var temp = parts[i].split("="); | ||
$_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]); | ||
} | ||
|
||
const buttonSaveSelected = document.getElementById("buttonsaveselected"); | ||
const cordsParentTextField = window.parent.document.getElementById($_GET.fieldid); | ||
if (buttonSaveSelected && cordsParentTextField && cordsTextField) { | ||
buttonSaveSelected.addEventListener('click', function () { | ||
cordsParentTextField.setAttribute("readonly", false); | ||
cordsParentTextField.value = cordsTextField.value; | ||
cordsParentTextField.setAttribute("readonly", true); | ||
window.parent.jModalClose(); | ||
}); | ||
} | ||
|
||
}); | ||
})(); | ||
(function(){'use strict'; | ||
document.addEventListener('DOMContentLoaded',function(){const; | ||
cordsTextField=document.getElementById('jform_paramsmodal_cords_map'); | ||
const; | ||
unique=cordsTextField.getAttribute('data-unique'); | ||
window['mymap'+unique]=L.map('mapid'+unique).setView([50.27264,7.26469],3); | ||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(window['mymap'+unique]); | ||
window['mymap'+unique].on('click',a); | ||
var o=L.marker([50.28,7.27]).addTo(window['mymap'+unique]).bindPopup(Joomla.JText._('COM_AGOSMS_BUTTON_DEFAULT_POPUP_PROMPT')).openPopup(); | ||
cordsTextField.value='50.28, 7.27'; | ||
function a(e){const; | ||
cordsTextField=document.getElementById('jform_paramsmodal_cords_map'); | ||
if(cordsTextField){cordsTextField.value=e.latlng.lat+', '+e.latlng.lng; | ||
var t=(e.latlng.lat),n=(e.latlng.lng),d=new L.LatLng(t,n); | ||
o.setLatLng(d)}}; | ||
var n=window.location.search.substr(1).split('&'),d={}; | ||
for(var e=0;e<n.length;e++){var t=n[e].split('='); | ||
d[decodeURIComponent(t[0])]=decodeURIComponent(t[1])}; | ||
const; | ||
buttonSaveSelected=document.getElementById('buttonsaveselected'); | ||
const; | ||
cordsParentTextField=window.parent.document.getElementById(d.fieldid); | ||
if(buttonSaveSelected&&cordsParentTextField&&cordsTextField){buttonSaveSelected.addEventListener('click',function(){cordsParentTextField.setAttribute('readonly',!1); | ||
cordsParentTextField.value=cordsTextField.value; | ||
cordsParentTextField.setAttribute('readonly',!0); | ||
window.parent.jModalClose()})}})})(); |
76 changes: 15 additions & 61 deletions
76
dist/agosms-1.0.59/media/com_agosms/js/admin-agosms-modal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,15 @@ | ||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
(function() { | ||
"use strict"; | ||
/** | ||
* Javascript to insert the link | ||
* View element calls jSelectWeblink when an weblink is clicked | ||
* jSelectWeblink creates the link tag, sends it to the editor, | ||
* and closes the select frame. | ||
**/ | ||
window.jSelectWeblink = function (id, title, catid, object, link, lang) { | ||
var hreflang = '', editor, tag; | ||
|
||
if (!Joomla.getOptions('xtd-weblinks')) { | ||
// Something went wrong! | ||
window.parent.jModalClose(); | ||
return false; | ||
} | ||
|
||
editor = Joomla.getOptions('xtd-weblinks').editor; | ||
|
||
if (lang !== '') | ||
{ | ||
hreflang = ' hreflang="' + lang + '"'; | ||
} | ||
|
||
tag = '<a' + hreflang + ' href="' + link + '">' + title + '</a>'; | ||
|
||
/** Use the API, if editor supports it **/ | ||
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) { | ||
Joomla.editors.instances[editor].replaceSelection(tag) | ||
} else { | ||
window.parent.jInsertEditorText(tag, editor); | ||
} | ||
|
||
window.parent.jModalClose(); | ||
}; | ||
|
||
document.addEventListener('DOMContentLoaded', function(){ | ||
// Get the elements | ||
var elements = document.querySelectorAll('.select-link'); | ||
|
||
for(var i = 0, l = elements.length; l>i; i++) { | ||
// Listen for click event | ||
elements[i].addEventListener('click', function (event) { | ||
event.preventDefault(); | ||
var functionName = event.target.getAttribute('data-function'); | ||
|
||
if (functionName === 'jSelectWeblink') { | ||
// Used in xtd_weblinks | ||
window[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), event.target.getAttribute('data-cat-id'), null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language', null)); | ||
} else { | ||
// Used in com_menus | ||
window.parent[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), event.target.getAttribute('data-cat-id'), null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language', null)); | ||
} | ||
}) | ||
} | ||
}); | ||
})(); | ||
(function(){'use strict'; | ||
window.jSelectWeblink=function(n,r,l,d,o,i){var a='',t,e; | ||
if(!Joomla.getOptions('xtd-weblinks')){window.parent.jModalClose(); | ||
return!1}; | ||
t=Joomla.getOptions('xtd-weblinks').editor; | ||
if(i!==''){a=' hreflang="'+i+'"'}; | ||
e='<a'+a+' href="'+o+'">'+r+'</a>'; | ||
if(window.Joomla&&window.Joomla.editors&&Joomla.editors.instances&&Joomla.editors.instances.hasOwnProperty(t)){Joomla.editors.instances[t].replaceSelection(e)} | ||
else{window.parent.jInsertEditorText(e,t)}; | ||
window.parent.jModalClose()}; | ||
document.addEventListener('DOMContentLoaded',function(){var e=document.querySelectorAll('.select-link'); | ||
for(var t=0,a=e.length;a>t;t++){e[t].addEventListener('click',function(t){t.preventDefault(); | ||
var e=t.target.getAttribute('data-function'); | ||
if(e==='jSelectWeblink'){window[e](t.target.getAttribute('data-id'),t.target.getAttribute('data-title'),t.target.getAttribute('data-cat-id'),null,t.target.getAttribute('data-uri'),t.target.getAttribute('data-language',null))} | ||
else{window.parent[e](t.target.getAttribute('data-id'),t.target.getAttribute('data-title'),t.target.getAttribute('data-cat-id'),null,t.target.getAttribute('data-uri'),t.target.getAttribute('data-language',null))}})}})})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.