Popup alerti - popravki

This commit is contained in:
tejagerjovic 2021-11-05 11:54:50 +01:00
parent 7562f17786
commit acc94c129f
23 changed files with 56 additions and 119 deletions

View File

@ -6484,7 +6484,7 @@ class SurveyAdminAjax {
echo $optional_parameter;
break;
//MAZA.js
//MAZA.js, VnaprejMarkers.js
case 'srv_resevanje_alert_location_not_found_map':
echo $lang['srv_resevanje_alert_location_not_found_map'];
break;
@ -6576,7 +6576,16 @@ class SurveyAdminAjax {
echo $lang['alert_copy_error'];
break;
//scripts.js, telephone.js
case 'alert_too_many_arguments':
echo $lang['alert_too_many_arguments'];
break;
case 'alert_missing_arguments':
echo $lang['alert_missing_arguments'];
break;
//script.js, telephone.js, invitations.js
case 'srv_newSurvey_survey_template_error':
echo $lang['srv_newSurvey_survey_template_error'];
break;
@ -6649,73 +6658,11 @@ class SurveyAdminAjax {
echo $lang['alert_choose_variables'];
break;
//calendar.js, drupal.js, nakupovanje_1ka_script.js,plugin.js
//calendar.js
case 'alert_parameter_text':
echo $optional_parameter;
break;
//VnaprejMarkers.js
case 'srv_resevanje_alert_location_not_found_map':
echo $lang['srv_resevanje_alert_location_not_found_map'];
break;
//aabr.js
case 'alert_word_explanation':
echo $lang['alert_word_explanation'];
break;
//plugin.js
case 'alert_parameter_editorlang':
echo $optional_parameter;
break;
//jquery.form.js
case 'alert_form_elements':
echo $lang['alert_form_elements'];
break;
//script.js
case 'alert_name_surname':
echo $lang['alert_name_surname'];
break;
case 'srv_remind_checkbox_max_violated_hard':
echo $lang['srv_remind_checkbox_max_violated_hard'];
break;
case 'srv_alert_number_exists':
echo $lang['srv_alert_number_exists'];
break;
case 'srv_alert_number_toobig':
echo $lang['srv_alert_number_toobig'];
break;
case 'srv_cookie_continue_alert':
echo $lang['srv_cookie_continue_alert'];
break;
case 'srv_alert_upload_size':
echo $lang['srv_alert_upload_size'];
break;
case 'srv_alert_upload_ext':
echo $lang['srv_alert_upload_ext'];
break;
//Geocoding.js
case 'srv_branching_no_results_geo_map':
echo $lang['srv_branching_no_results_geo_map'];
echo ': ';
echo $optional_parameter;
break;
//KlikNaMapo.js, UserLocation.js
case 'srv_resevanje_alert_location_not_found_map':
echo $lang['srv_resevanje_alert_location_not_found_map'];
break;
//SurveyAdmin.php
case 'srv_filealert':
echo $lang['srv_filealert'];
@ -6729,8 +6676,8 @@ class SurveyAdminAjax {
//class.SurveyCondition.php
case 'alert_no_action_set':
echo $lang['alert_no_action_set'];
break;
break;
}

View File

@ -945,12 +945,12 @@ return this.each(function () {
if (args.length == 3) {
plugin.data[args[0]][args[1]][args[2]] = d;
} else {
alert ('To many arguments! Plugin: dataHolder');
genericAlertPopup('alert_too_many_arguments');
}
}
}
} else {
alert ('Missing arguments! Plugin: dataHolder');
genericAlertPopup('alert_missing_arguments');
}
};
@ -993,7 +993,7 @@ return this.each(function () {
res = false;
if (args.length == 0) {
alert ('Missing arguments! Plugin: dataHolder');
genericAlertPopup('alert_missing_arguments');
return res;
}
@ -1009,7 +1009,7 @@ return this.each(function () {
if (args.length == 3 && plugin.data[args[0]][args[1]][args[2]] == d) {
res = true;
} else {
alert ('To many arguments! Plugin: dataHolder');
genericAlertPopup('alert_too_many_arguments');
}
}
}
@ -1050,7 +1050,7 @@ return this.each(function () {
if (args.length == 3) {
res = $.isEmptyObject(plugin.data[args[0]][args[1]][args[2]]) == false || plugin.data[args[0]][args[1]][args[2]] == d;
} else {
alert ('To many arguments! Plugin: dataHolder');
genericAlertPopup('alert_too_many_arguments');
}
}
}

View File

@ -843,7 +843,7 @@ function inv_message_save_details() {
window.location.reload()
} else {
// so napake
alert (' '+data.msg);
genericAlertPopup('alert_parameter_datamsg',data.msg);
}
}
);

View File

@ -78,7 +78,7 @@ CKEDITOR.dialog.add( 'abbrDialog', function( editor ) {
'default': 'tooltip mouseover',
validate: function() {
if ( this.getValue() == null ) {
genericAlertPopup('alert_word_explanation');
alert( 'Niste izbrali: Izberite način prikazovanja razlage besede, ki jo bo videl uporabnik ankete.' );
return false;
}
},

View File

@ -598,7 +598,7 @@
var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
isValid = !!( aMatch && parseInt( aMatch[ 1 ], 10 ) !== 0 );
if ( !isValid )
genericAlertPopup('alert_parameter_editorlang',editor.lang.common.invalidWidth);
alert( editor.lang.common.invalidWidth );
return isValid;
},
setup: setupDimension,
@ -638,7 +638,7 @@
var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
isValid = !!( aMatch && parseInt( aMatch[ 1 ], 10 ) !== 0 );
if ( !isValid )
genericAlertPopup('alert_parameter_editorlang',editor.lang.common.invalidHeight);
alert( editor.lang.common.invalidHeight );
return isValid;
},
setup: setupDimension,

View File

@ -202,7 +202,7 @@
return true;
if ( !editor.config.linkJavaScriptLinksAllowed && ( /javascript\:/ ).test( this.getValue() ) ) {
genericAlertPopup('alert_parameter_editorlang',commonLang.invalidValue); // jshint ignore:line
alert( commonLang.invalidValue ); // jshint ignore:line
return false;
}

View File

@ -54,13 +54,13 @@
{
if ( !this.getValue() )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noCode);
alert( editor.lang.youtube.noCode );
return false;
}
else
if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidEmbed);
alert( editor.lang.youtube.invalidEmbed );
return false;
}
}
@ -93,7 +93,7 @@
{
if ( !this.getValue() )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noCode);
alert( editor.lang.youtube.noCode );
return false;
}
else{
@ -101,7 +101,7 @@
if ( this.getValue().length === 0 || video === false)
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidUrl );
alert( editor.lang.youtube.invalidUrl );
return false;
}
}
@ -122,12 +122,12 @@
if ( width === 0 )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidWidth);
alert( editor.lang.youtube.invalidWidth );
return false;
}
}
else {
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noWidth);
alert( editor.lang.youtube.noWidth );
return false;
}
}
@ -146,12 +146,12 @@
if ( height === 0 )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidHeight);
alert( editor.lang.youtube.invalidHeight );
return false;
}
}
else {
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noHeight);
alert( editor.lang.youtube.noHeight );
return false;
}
}
@ -226,7 +226,7 @@
if ( !/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test( str ) )
{
genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidTime);
alert( editor.lang.youtube.invalidTime );
return false;
}
}

View File

@ -538,7 +538,7 @@ Drupal.displayAjaxError = function (message) {
// request was still ongoing. See, for example, the discussion at
// http://stackoverflow.com/questions/699941/handle-ajax-error-when-a-user-clicks-refresh.
if (!Drupal.beforeUnloadCalled) {
genericAlertPopup('alert_parameter_text',message);
alert(message);
}
};

View File

@ -31,7 +31,7 @@ Drupal.behaviors.DSExtrasSwitchViewmode = {
Drupal.attachBehaviors();
}
else {
genericAlertPopup('alert_parameter_dataerrormsg',data.errorMessage);
alert(data.errorMessage);
}
},
error: function (xmlhttp) {

View File

@ -184,7 +184,7 @@ $.fn.ajaxSubmit = function(options) {
if ($(':input[name=submit],:input[id=submit]', form).length) {
// if there is an input with a name or id of 'submit' then we won't be
// able to invoke the submit fn on the form (at least not x-browser)
genericAlertPopup('alert_form_elements');
alert('Error: Form elements must not have name or id of "submit".');
return;
}

View File

@ -184,7 +184,7 @@ $.fn.ajaxSubmit = function(options) {
if ($(':input[name=submit],:input[id=submit]', form).length) {
// if there is an input with a name or id of 'submit' then we won't be
// able to invoke the submit fn on the form (at least not x-browser)
genericAlertPopup('alert_form_elements');
alert('Error: Form elements must not have name or id of "submit".');
return;
}

View File

@ -5,7 +5,7 @@ function CheckEmail(text) {
var Email = jQuery('[name="email"]').val();
if (Email.length > 1 && (Email.search('@') == -1 || Email.indexOf('.') == -1)) {
genericAlertPopup('alert_parameter_text',text);
alert(text);
return false;
}

View File

@ -77,7 +77,7 @@
validate: function() {
if (this.getValue() == 'not_set') {
var message = 'Please make a selection from ' + Drupal.settings.picture.label;
genericAlertPopup('alert_parameter_text',message);
alert(message);
return false;
} else {
return true;
@ -179,7 +179,7 @@
validate: function() {
if (this.getValue() == 'not_set') {
var message = 'Please make a selection from ' + Drupal.settings.picture.label;
genericAlertPopup('alert_parameter_text',message);
alert(message);
return false;
} else {
return true;

View File

@ -5,7 +5,7 @@ function CheckEmail(text) {
var Email = jQuery('[name="email"]').val();
if (Email.length > 1 && (Email.search('@') == -1 || Email.indexOf('.') == -1)) {
genericAlertPopup('alert_parameter_text',text);
alert(text);
return false;
}

View File

@ -10,7 +10,7 @@ function LostPassword(alert_text) {
var email = document.getElementById('em').value;
if (email === '') {
genericAlertPopup('alert_parameter_text',alert_text);
alert(alert_text);
}
else {

View File

@ -4142,8 +4142,6 @@ $lang = array (
"srv_vrednost_fastadd_txt" => "Vsako kategorijo vpišite v svojo vrstico.",
"srv_settings_komentarji" => "Komentarji",
"srv_settings_komentarji1" => "Nastavitve",
"srv_data_not_up_to_date" => "Posodobljeno: %s. <a href=\"#\" onClick=\"createCollectData();return false;\">Posodobi!</a>",
"srv_data_not_up_to_date_alert" => "Posodobljeno: %s. <a href=\"#\" onClick=\"alert('Naslednja posodobitev se lahko izvede ob: %s');return false;\">Posodobi!</a>",
"srv_data_not_exist" => "Datoteka s podatki ne obstaja. <a href=\"#\" onClick=\"createCollectData();return false;\">Kreiraj!</a>",
"srv_dashboard_not_up_to_date" => "Datoteka s podatki ni ažurna.",
"srv_dashboard_not_exist" => "Datoteka s podatki in statusi ne obstaja.",
@ -8262,9 +8260,8 @@ $lang = array (
'alert_error_code' => "Napaka! Koda napake: ",
'alert_invalidPID' => "Neveljaven PID!",
'alert_choose_variables' => "Najprej izberite variable",
'alert_word_explanation' => "Niste izbrali: Izberite način prikazovanja razlage besede, ki jo bo videl uporabnik ankete.",
'alert_form_elements' => "Napaka: Elementi obrazca ne smejo imeti 'submit' kot svoje ime ali id.",
'alert_name_surname' => "Opozorilo: napačen vpis\r\n\r\nPonovno vpišite ime in začetnico priimka.",
'alert_too_many_arguments' => "Preveč argumentov! Plugin: dataHolder",
'alert_missing_arguments' => "Manjkajoči argumenti! Plugin: dataHolder",

View File

@ -3465,8 +3465,6 @@ Ta&#269;nu lokaciju fajla sa podacima mo&#382;emo potra&#382;iti na slede&#269;i
"srv_vrednost_fastadd_txt" => "Svaku kategoriju upi&#353;ite u svoj red.",
"srv_settings_komentarji" => "Komentari",
"srv_settings_komentarji1" => "Pode&#353;avanja komentara",
"srv_data_not_up_to_date" => "A&#382;urirano: %s. <a href=\"#\" onClick=\"createCollectData();return false;\">A&#382;uriraj!</a>",
"srv_data_not_up_to_date_alert" => "A&#382;urirano: %s. <a href=\"#\" onClick=\"alert('Slede&#269;e a&#382;uriranje se mo&#382;e izvesti u: %s');return false;\">A&#382;uriraj!</a>",
"srv_data_not_up_to_date_user" => "Fajl sa podacima nije a&#382;uriran. Za a&#382;uriranje fajla sa podacima potreban vam je status Mena&#273;era! (<a href=\"http://www.1ka.si/db/19/193/&#268;esta%20pitanja/Koliko_&#269;esto_se_a&#382;urirajo_podaci_i_statusi/\" target=\"_blank\">FAQ</a>)",
"srv_data_not_up_to_date_timeout" => "Fajl sa podacima nije a&#382;uriran. (<a href=\"http://www.1ka.si/db/19/193/&#268;esta%20pitanja/Koliko_&#269;esto_se_a&#382;urirajo_podaci_i_statusi/\" target=\"_blank\">FAQ</a>)",
"srv_data_not_exist" => "Fajl sa podacima ne postoji. <a href=\"#\" onClick=\"createCollectData();return false;\">Kreiraj!</a>",

View File

@ -4123,8 +4123,6 @@ $lang = array (
"srv_vrednost_fastadd_txt" => "Add each category in new line.",
"srv_settings_komentarji" => "Comments",
"srv_settings_komentarji1" => "Comments settings",
"srv_data_not_up_to_date" => "Data table file is not up to date. <a href=\"#\" onClick=\"createCollectData();return false;\">Refresh data table file!</a>",
"srv_data_not_up_to_date_alert" => "Refreshed: %s. <a href=\"#\" onClick=\"alert('Next refresh can start at: %s');return false;\">Refresh!</a>",
"srv_data_not_exist" => "Data table file does not exist. <a href=\"#\" onClick=\"createCollectData();return false;\">Create data table file!</a>",
"srv_dashboard_not_up_to_date" => "Data file is not up to date.",
"srv_dashboard_not_exist" => "Status file and data table file does not exists.",
@ -8158,9 +8156,8 @@ GDPR introduction preview",
'alert_error_code' => "Error! Error code: ",
'alert_invalidPID' => "Invalid PID!",
'alert_choose_variables' => "First, choose the variables",
'alert_word_explanation' => "Not selected: Select the way the explanation of the word will be displayed for the survey user to see.",
'alert_form_elements' => "Error: Form elements must not have name or id of 'submit'.",
'alert_name_surname' => "Warning: incorrect entry\r\n\r\nPlease re-enter your first name and the initial of your surname.",
'alert_too_many_arguments' => "Too many arguments! Plugin: dataHolder",
'alert_missing_arguments' => "Missing arguments! Plugin: dataHolder",

View File

@ -3465,8 +3465,6 @@ Ta&#269;nu lokaciju fajla sa podacima mo&#382;emo potra&#382;iti na slede&#269;i
"srv_vrednost_fastadd_txt" => "Svaku kategoriju upi&#353;ite u svoj red.",
"srv_settings_komentarji" => "Komentari",
"srv_settings_komentarji1" => "Pode&#353;avanja komentara",
"srv_data_not_up_to_date" => "A&#382;urirano: %s. <a href=\"#\" onClick=\"createCollectData();return false;\">A&#382;uriraj!</a>",
"srv_data_not_up_to_date_alert" => "A&#382;urirano: %s. <a href=\"#\" onClick=\"alert('Slede&#269;e a&#382;uriranje se mo&#382;e izvesti u: %s');return false;\">A&#382;uriraj!</a>",
"srv_data_not_up_to_date_user" => "Fajl sa podacima nije a&#382;uriran. Za a&#382;uriranje fajla sa podacima potreban vam je status Mena&#273;era! (<a href=\"http://www.1ka.si/db/19/193/&#268;esta%20pitanja/Koliko_&#269;esto_se_a&#382;urirajo_podaci_i_statusi/\" target=\"_blank\">FAQ</a>)",
"srv_data_not_up_to_date_timeout" => "Fajl sa podacima nije a&#382;uriran. (<a href=\"http://www.1ka.si/db/19/193/&#268;esta%20pitanja/Koliko_&#269;esto_se_a&#382;urirajo_podaci_i_statusi/\" target=\"_blank\">FAQ</a>)",
"srv_data_not_exist" => "Fajl sa podacima ne postoji. <a href=\"#\" onClick=\"createCollectData();return false;\">Kreiraj!</a>",

View File

@ -82,7 +82,7 @@ function geocoderFromAddress(address, callback){
}
//ce ni najdenih rezultatov za vpisan naslov v nastavitvah (fokus)
else if(status === google.maps.GeocoderStatus.ZERO_RESULTS){
genericAlertPopup('srv_branching_no_results_geo_map',address);
alert(lang['srv_branching_no_results_geo_map']+': '+address);
}
else
console.log('Geocoder error: ' + status);

View File

@ -33,7 +33,7 @@ function klikNaMapo(spremenljivka) {
} else {
//odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
genericAlertPopup('srv_resevanje_alert_location_not_found_map');
alert(lang['srv_resevanje_alert_location_not_found_map']);
}
});
}

View File

@ -87,7 +87,7 @@ function userLocationProceduraF(pos, spremenljivka) {
}
} else {
//odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
genericAlertPopup('srv_resevanje_alert_location_not_found_map');
alert(lang['srv_resevanje_alert_location_not_found_map']);
}
});
}

View File

@ -389,7 +389,7 @@ function checkboxLimit (spremenljivka, vrednost, checkbox_limit) {
if (count > checkbox_limit){
document.getElementById('spremenljivka_'+spremenljivka+'_vrednost_'+vrednost).checked = false;
genericAlertPopup('srv_remind_checkbox_max_violated_hard');
alert(lang_srv_remind_checkbox_max_violated_hard);
}
}
@ -459,7 +459,7 @@ function checkName (spremenljivka, polje){
var index = imena.indexOf(field);
if(index != -1){
polje.value = '';
genericAlertPopup('alert_name_surname');
alert('Opozorilo: napa\u010Den vpis\r\n\r\nPonovno vpi\u0161ite ime in za\u010Detnico priimka');
}
//$('#right_'+spremenljivka).load('ajax.php?a=check_name', {spremenljivka: spremenljivka, field: field});
}
@ -481,13 +481,13 @@ function checkRankingNum (field, max, spremenljivka, count){
}
if(!ok && val != ''){
genericAlertPopup('srv_alert_number_exists');
alert(lang_srv_alert_number_exists);
field.value = '';
}
if(val > max){
genericAlertPopup('srv_alert_number_toobig');
alert(lang_srv_alert_number_toobig);
field.value = '';
}
}
@ -1337,7 +1337,7 @@ function cookie_ok () {
function cookie_check() {
if ( $('#cookie_alert').css('display') == 'block' ) {
genericAlertPopup('srv_cookie_continue_alert');
alert(lang['srv_cookie_continue_alert']);
return false;
}
@ -1909,7 +1909,7 @@ function checkUpload(upload, id){
// File is too large
if(fileSize > maxSize){
$(upload).val(null);
genericAlertPopup('srv_alert_upload_size');
alert(lang["srv_alert_upload_size"]);
return;
}
@ -1928,7 +1928,7 @@ function checkUpload(upload, id){
// Wrong file extension
if(!extAllowed.includes(fileExt)){
$(upload).val(null);
genericAlertPopup('srv_alert_upload_ext');
alert(lang["srv_alert_upload_ext"]);
return;
}