diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php
index b8d6efdce..394b3a563 100644
--- a/admin/survey/SurveyAdmin.php
+++ b/admin/survey/SurveyAdmin.php
@@ -4408,7 +4408,7 @@ class SurveyAdmin
} else {
echo '
';
diff --git a/admin/survey/SurveyAdminAjax.php b/admin/survey/SurveyAdminAjax.php
index c0e6f4f18..a75edbe09 100644
--- a/admin/survey/SurveyAdminAjax.php
+++ b/admin/survey/SurveyAdminAjax.php
@@ -6429,7 +6429,318 @@ class SurveyAdminAjax {
.'">'
.$lang['srv_tip_sample_t6_8_o2'].'';
echo '';
-}
+ }
+
+ // Generičen alert popup
+ private function ajax_genericAlertPopup(){
+ global $lang;
+
+ $name = $_POST['name'];
+ $optional_parameter = $_POST['optional_parameter'];
+
+
+ // Generičen alert popup - vsebina
+ echo '
'.$lang['srv_warning'].'
';
+ echo '';
+ echo '';
+
+ }
}
?>
\ No newline at end of file
diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php
index 947d9e2b5..47b24c395 100644
--- a/admin/survey/SurveyAdminSettings.php
+++ b/admin/survey/SurveyAdminSettings.php
@@ -280,9 +280,8 @@ class SurveyAdminSettings {
echo ''.$lang['srv_opozorilo_vprasanja'].':
'.$lang['srv_soft_reminder_all'].',
- '.$lang['srv_hard_reminder_all'].',
- '.$lang['srv_no_reminder_all'].'';
-
+ '.$lang['srv_hard_reminder_all'].',
+ '.$lang['srv_no_reminder_all'].'';
echo '
';
// Napredni parapodatki
@@ -8131,7 +8130,7 @@ class SurveyAdminSettings {
function displayBtnMailtoPreview($row) {
global $lang;
echo '';
diff --git a/admin/survey/classes/class.SurveyCondition.php b/admin/survey/classes/class.SurveyCondition.php
index a0e0a81f2..c460f4190 100644
--- a/admin/survey/classes/class.SurveyCondition.php
+++ b/admin/survey/classes/class.SurveyCondition.php
@@ -112,7 +112,7 @@ class SurveyCondition
$popUp->addButton(new PopUpCancelButton());
#dodamo gumb izberi profil
- $confirmAction = 'alert(\'No action set\')';
+ $confirmAction = 'genericAlertPopup(\'alert_no_action_set\')';
if (isset($this->_chooseProfileJSAction) && !empty($this->_chooseProfileJSAction))
{
$confirmAction = $this->_chooseProfileJSAction;
diff --git a/admin/survey/minify/builder/_index.js b/admin/survey/minify/builder/_index.js
index ef30568cf..0b6a80c53 100644
--- a/admin/survey/minify/builder/_index.js
+++ b/admin/survey/minify/builder/_index.js
@@ -162,12 +162,12 @@ var MUB = {
ext = thisExt;
else if (thisExt !== ext) {
fail = true;
- return alert('extensions must match!');
+ return genericAlertPopup('alert_extensions_match');
}
this.value = this.value.replace(/^\//, '');
if (-1 !== $.inArray(this.value, sources)) {
fail = true;
- return alert('duplicate file!');
+ return genericAlertPopup('alert_duplicate_file');
}
sources.push(this.value);
}
diff --git a/admin/survey/minify/builder/bm.js b/admin/survey/minify/builder/bm.js
index e04569f69..16f552f1b 100644
--- a/admin/survey/minify/builder/bm.js
+++ b/admin/survey/minify/builder/bm.js
@@ -32,7 +32,5 @@ javascript:(function() {
if (uris.length)
window.open('%BUILDER_URL%#' + uris.join(','));
else
- alert('No js/css files found with URLs within "'
- + home.split('/')[2]
- + '".\n(This tool is limited to URLs with the same domain.)');
+ genericAlertPopup('alert_no_jscss_found',home.split('/')[2]);
})();
\ No newline at end of file
diff --git a/admin/survey/modules/mod_MAZA/js/MAZA.js b/admin/survey/modules/mod_MAZA/js/MAZA.js
index bf32b2900..0a94cc743 100644
--- a/admin/survey/modules/mod_MAZA/js/MAZA.js
+++ b/admin/survey/modules/mod_MAZA/js/MAZA.js
@@ -476,7 +476,7 @@ function maza_klikNaMapo() {
maza_saveGeofence(data.formatted_address, maza_create_basic_circle(pos, data.formatted_address, maza_default_radius, false));
} else {
//odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
- alert(lang['srv_resevanje_alert_location_not_found_map']);
+ genericAlertPopup('srv_resevanje_alert_location_not_found_map');
}
});
diff --git a/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js b/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js
index be48f9b57..84c41a3f4 100644
--- a/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js
+++ b/admin/survey/modules/mod_hierarhija/js/vendor/hierarhija_analize.js
@@ -297,7 +297,7 @@ function doArchiveMeans() {
$('#fullscreen').show();
});
} else {
- alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveMeans() {
@@ -323,7 +323,7 @@ function submitArchiveMeans() {
$("#fullscreen").show();
});
} else {
- alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -347,9 +347,9 @@ function createArchiveMeansBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!" + response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!" + response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -357,7 +357,7 @@ function createArchiveMeansBeforeEmail() {
});
} else {
- alert('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
diff --git a/admin/survey/script/LanguageTechnology.js b/admin/survey/script/LanguageTechnology.js
index f0c5112ac..3a9c6a751 100644
--- a/admin/survey/script/LanguageTechnology.js
+++ b/admin/survey/script/LanguageTechnology.js
@@ -150,7 +150,7 @@ function runLanguageTechnology() {
}
if (response['error'] != undefined) {
if (response['error']['hasError'] == true) {
- alert(response['error']['msg']);
+ genericAlertPopup('alert_parameter_response',response['error']['msg']);
// cleanUpAndReturn();
return false;
}
@@ -165,9 +165,9 @@ function runLanguageTechnology() {
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
@@ -493,7 +493,7 @@ function changeWordType(spremenljivka, wordIndex, word, wordType) {
if (response['error'] != undefined) {
if (response['error']['hasError'] == true) {
- alert(response['error']['msg']);
+ genericAlertPopup('alert_parameter_response',response['error']['msg']);
// cleanUpAndReturn();
return false;
@@ -518,9 +518,9 @@ function changeWordType(spremenljivka, wordIndex, word, wordType) {
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
@@ -627,7 +627,7 @@ function displaySynsetHypernymHyponym(spremenljivka, wordIndex, wordType) {
if (response['error'] != undefined) {
if (response['error']['hasError'] == true) {
- alert(response['error']['msg']);
+ genericAlertPopup('alert_parameter_response',response['error']['msg']);
return false;
}
}
@@ -635,9 +635,9 @@ function displaySynsetHypernymHyponym(spremenljivka, wordIndex, wordType) {
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
@@ -1396,16 +1396,16 @@ function lt_export_excel() {
data: request,
success: function (response) {
if (response['error'] == true) {
- alert(response['msg']);
+ genericAlertPopup('alert_parameter_response',response['msg']);
return false;
}
window.open(response['url']);
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
diff --git a/admin/survey/script/LanguageTechnology_old.js b/admin/survey/script/LanguageTechnology_old.js
index 2137418f9..ec0f325a0 100644
--- a/admin/survey/script/LanguageTechnology_old.js
+++ b/admin/survey/script/LanguageTechnology_old.js
@@ -53,7 +53,7 @@ function runLanguageTechnology() {
if (response['error'] != undefined) {
if (response['error']['hasError'] == true) {
- alert(response['error']['msg']);
+ genericAlertPopup('alert_parameter_response',response['error']['msg']);
// cleanUpAndReturn();
return false;
@@ -75,9 +75,9 @@ function runLanguageTechnology() {
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
@@ -656,16 +656,16 @@ function lt_export_excel() {
data: request,
success: function (response) {
if (response['error'] == true) {
- alert(response['msg']);
+ genericAlertPopup('alert_parameter_response',response['msg']);
return false;
}
window.open(response['url']);
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
@@ -709,7 +709,7 @@ function changeWordType(spremenljivka, wordIndex, word, wordType) {
if (response['error'] != undefined) {
if (response['error']['hasError'] == true) {
- alert(response['error']['msg']);
+ genericAlertPopup('alert_parameter_response',response['error']['msg']);
// cleanUpAndReturn();
return false;
@@ -734,9 +734,9 @@ function changeWordType(spremenljivka, wordIndex, word, wordType) {
},
error: function(x, t, m) {
if(t==="timeout") {
- alert("got timeout");
+ genericAlertPopup('alert_timeout');
} else {
- alert('Prišlo je do neznane napake.');
+ genericAlertPopup('alert_unknown_error');
}
},
complete: function() {
diff --git a/admin/survey/script/Maps/VnaprejMarkers.js b/admin/survey/script/Maps/VnaprejMarkers.js
index e4b992642..7ac861d55 100644
--- a/admin/survey/script/Maps/VnaprejMarkers.js
+++ b/admin/survey/script/Maps/VnaprejMarkers.js
@@ -317,7 +317,7 @@ function drawMarkers(spremenljivka) {
} else {
marker.setMap(null);
//odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
- alert(lang['srv_resevanje_alert_location_not_found_map']);
+ genericAlertPopup('srv_resevanje_alert_location_not_found_map');
}
});
});
diff --git a/admin/survey/script/appendMerge.js b/admin/survey/script/appendMerge.js
index 19822ed20..f4c27eb85 100644
--- a/admin/survey/script/appendMerge.js
+++ b/admin/survey/script/appendMerge.js
@@ -105,10 +105,10 @@ function append_prepare_add_recipients() {
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=invitations&a=get_profile_name', {anketa:srv_meta_anketa_id, recipients_list:recipients_list, fields:fields, noNavi:'true', doAdd:doAdd, pid:pid});
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
} else if (type == 0) {
@@ -158,10 +158,10 @@ function append_add_recipients(profile_id) {
$elm.next().find('a').addClass('active');
$elm.removeClass('inv_ff_left_on').addClass('inv_ff_right_on').next().next().addClass('inv_ff_left_on');
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
}
diff --git a/admin/survey/script/branching.js b/admin/survey/script/branching.js
index 08ddd40b6..66454fc68 100644
--- a/admin/survey/script/branching.js
+++ b/admin/survey/script/branching.js
@@ -49,10 +49,10 @@ function onload_init_branching() {
if (locked) {
$('#branching ul.first.locked').bind('click', function (event) {
if ($("#prevent_unlock").val() == 1) {
- alert(lang['srv_unlock_popup3']);
+ genericAlertPopup('srv_unlock_popup3');
}
else {
- alert(lang['srv_unlock_popup2']);
+ genericAlertPopup('srv_unlock_popup2');
}
});
return;
diff --git a/admin/survey/script/break.js b/admin/survey/script/break.js
index 209d42ad9..719bd8951 100644
--- a/admin/survey/script/break.js
+++ b/admin/survey/script/break.js
@@ -39,7 +39,7 @@ function doArchiveBreak() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveBreak() {
@@ -56,7 +56,7 @@ function submitArchiveBreak() {
$("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -72,9 +72,9 @@ function createArchiveBreakBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -82,6 +82,6 @@ function createArchiveBreakBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
\ No newline at end of file
diff --git a/admin/survey/script/cReport.js b/admin/survey/script/cReport.js
index f62efc1e2..e327d8abb 100644
--- a/admin/survey/script/cReport.js
+++ b/admin/survey/script/cReport.js
@@ -402,7 +402,7 @@ function doArchiveCReport() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveCReport() {
@@ -419,7 +419,7 @@ function submitArchiveCReport() {
$("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -435,9 +435,9 @@ function createArchiveCReportBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -445,7 +445,7 @@ function createArchiveCReportBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
diff --git a/admin/survey/script/calendar/calendar.js b/admin/survey/script/calendar/calendar.js
index c788fce7c..85aeab9b1 100644
--- a/admin/survey/script/calendar/calendar.js
+++ b/admin/survey/script/calendar/calendar.js
@@ -641,7 +641,7 @@ Calendar.cellClick = function(el, ev) {
"Thank you!\n" +
"http://dynarch.com/mishoo/calendar.epl\n";
}
- alert(text);
+ genericAlertPopup('alert_parameter_text');
return;
case -2:
if (year > cal.minYear) {
diff --git a/admin/survey/script/charts.js b/admin/survey/script/charts.js
index d55062e65..fbf9845c2 100644
--- a/admin/survey/script/charts.js
+++ b/admin/survey/script/charts.js
@@ -264,7 +264,7 @@ function chartSaveAdvancedSettings (spid, loop) {
var checkEmpty = chartAdvancedSettingsLimitEmpty();
if(checkEmpty == true){
- alert(lang['srv_chart_num_limit_warning']);
+ genericAlertPopup('srv_chart_num_limit_warning');
}
else{
$.post('ajax.php?t=charts&a=chart_save_advanced_settings', form, function(data) {
diff --git a/admin/survey/script/collectData.js b/admin/survey/script/collectData.js
index 075d4b124..61f2eba31 100644
--- a/admin/survey/script/collectData.js
+++ b/admin/survey/script/collectData.js
@@ -24,7 +24,7 @@ function collectDataAjax(){
location.reload();
}
else{
- alert(lang['srv_collectdata_failed']);
+ genericAlertPopup('srv_collectdata_failed');
}
}
});
diff --git a/admin/survey/script/conditionProfiles.js b/admin/survey/script/conditionProfiles.js
index 3e64a0272..9ebbd2ba1 100644
--- a/admin/survey/script/conditionProfiles.js
+++ b/admin/survey/script/conditionProfiles.js
@@ -54,7 +54,7 @@ function conditionProfileAction(action) {
// dropdownu dodamo nov prodil in ga izberemo
$("#current_condition_profile").append( $("").attr("value", newId).attr( "selected", true).text(name));
} else {
- alert('Error!');
+ genericAlertPopup('error');
}
});
@@ -106,5 +106,5 @@ function conditionProfileAction(action) {
$.post('ajax.php?t=conditionProfile&a=change_condition_profile', { anketa : srv_meta_anketa_id, pid : pid, meta_akcija : srv_meta_akcija, podstran : srv_meta_podstran, condition_label:condition_label, condition_error:condition_error }, function() {
return reloadData('condition');
});
- } else {alert('Missing action:'+action)};
+ } else {genericAlertPopup('alert_missing_action',action)};
}
\ No newline at end of file
diff --git a/admin/survey/script/crosstab.js b/admin/survey/script/crosstab.js
index ae41c76d5..02719effb 100644
--- a/admin/survey/script/crosstab.js
+++ b/admin/survey/script/crosstab.js
@@ -210,7 +210,7 @@ function doArchiveCrosstab() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function createArchiveCrosstabBeforeEmail() {
@@ -230,9 +230,9 @@ function createArchiveCrosstabBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -240,7 +240,7 @@ function createArchiveCrosstabBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveCrosstabs() {
@@ -263,7 +263,7 @@ function submitArchiveCrosstabs() {
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
diff --git a/admin/survey/script/dataSettingProfiles.js b/admin/survey/script/dataSettingProfiles.js
index 50c0afb15..b428d568f 100644
--- a/admin/survey/script/dataSettingProfiles.js
+++ b/admin/survey/script/dataSettingProfiles.js
@@ -171,7 +171,7 @@ function dataSettingProfileAction(action) {
return reloadData('dataSetting');
});
} else {
- alert(action);
+ genericAlertPopup('alert_parameter_action',action);
return false;
}
}
diff --git a/admin/survey/script/invitations.js b/admin/survey/script/invitations.js
index 6172a97ea..7aefc1b42 100644
--- a/admin/survey/script/invitations.js
+++ b/admin/survey/script/invitations.js
@@ -170,10 +170,10 @@ function inv_add_recipients(profile_id) {
$elm.next().find('a').addClass('active');
$elm.removeClass('inv_ff_left_on').addClass('inv_ff_right_on').next().next().addClass('inv_ff_left_on');
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
}
@@ -890,7 +890,7 @@ function inv_edit_rec_profile() {
}
function inv_prepare_add_recipients() {
- alert('Deprecated!');
+ genericAlertPopup('alert_deprecated');
return false;
}
@@ -911,10 +911,10 @@ function inv_recipients_add_to_list() {
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=invitations&a=get_profile_name', {anketa:srv_meta_anketa_id, recipients_list:recipients_list, fields:fields, noNavi:'true', doAdd:doAdd});
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
}
@@ -1024,7 +1024,7 @@ function inv_recipients_form_action(action) {
if (data.success == 1) {
$(".anketa_edit_main").load('ajax.php?t=invitations&a=view_recipients', {anketa:srv_meta_anketa_id});
} else {
- alert(data.error);
+ genericAlertPopup('alert_parameter_dataerror',data.error);
}
});
}
@@ -1305,10 +1305,10 @@ function inv_list_get_name(saveNew) {
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=invitations&a=list_get_name', {anketa:srv_meta_anketa_id, recipients_list:recipients_list, fields:fields, noNavi:'true', pid:pid, saveNew:saveNew});
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
}
@@ -1326,7 +1326,7 @@ function inv_list_save() {
var recipients_list = $("#inv_prof_recipients_list").val();
var field_list = $("#inv_prof_field_list").val();
var saveNew = ($("#saveNew").val() == 'true') ? 'true': 'false';
- alert(profile_name);
+ genericAlertPopup('alert_parameter_profilename',profile_name);
$(".anketa_edit_main").load('ajax.php?t=invitations&a=inv_list_save', {anketa:srv_meta_anketa_id, recipients_list:recipients_list, field_list:field_list, profile_id:profile_id, profile_name:profile_name, profile_comment:profile_comment, saveNew:saveNew});
$('#fade').fadeOut('slow');
$('#fullscreen').fadeOut('slow').html('');
@@ -1423,10 +1423,10 @@ function inv_upload_list_check() {
if (extension == 'txt' || extension == 'csv') {
$('#inv_recipients_upload_form').submit();
} else {
- alert("Nepravilna vrsta datoteke!");
+ genericAlertPopup('alert_incorrect_filetype');
}
} else {
- alert("Izberite datoteko!");
+ genericAlertPopup('alert_choose_file');
}
}
@@ -1560,12 +1560,12 @@ function invRecipientsForward() {
}
else
{
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
}
else
{
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
}
diff --git a/admin/survey/script/means.js b/admin/survey/script/means.js
index 9cf57acff..b41e0decb 100644
--- a/admin/survey/script/means.js
+++ b/admin/survey/script/means.js
@@ -124,7 +124,7 @@ function doArchiveMeans() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveMeans() {
@@ -141,7 +141,7 @@ function submitArchiveMeans() {
$("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -157,9 +157,9 @@ function createArchiveMeansBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -167,6 +167,6 @@ function createArchiveMeansBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
\ No newline at end of file
diff --git a/admin/survey/script/missingProfiles.js b/admin/survey/script/missingProfiles.js
index eeb304250..d10f17117 100644
--- a/admin/survey/script/missingProfiles.js
+++ b/admin/survey/script/missingProfiles.js
@@ -132,11 +132,11 @@ function missingProfileAction(action) {
$("#renameProfileDiv").hide();
$("#missingProfileCoverDiv").fadeOut();
} else {
- alert(response);
+ genericAlertPopup('alert_parameter_response',response);
}
});
} else {
- alert(action);
+ genericAlertPopup('alert_parameter_action',action);
}
}
diff --git a/admin/survey/script/missingValues.js b/admin/survey/script/missingValues.js
index 2b046c045..f6ae7e828 100644
--- a/admin/survey/script/missingValues.js
+++ b/admin/survey/script/missingValues.js
@@ -53,7 +53,7 @@ function sysMissingValuesAdd()
if (filter != undefined && !(filter === '') && text != undefined && !(text === '' )) {
$("#sys_missing_values").load('ajax.php?t=missingValues&a=sysMissingValuesAdd', {filter:filter, text:text});
} else {
- alert(lang['srv_missing_value_not_empty']);
+ genericAlertPopup('srv_missing_value_not_empty');
}
}
function sysMissingValuesDelete(id)
@@ -70,7 +70,7 @@ function sysMissingValuesSave(id) {
if (filter != undefined && !(filter === '') && text != undefined && !(text === '') ) {
$("#sys_missing_values").load('ajax.php?t=missingValues&a=sysMissingValuesSave', {filter:filter, text:text, id:id});
} else {
- alert(lang['srv_missing_value_not_empty']);
+ genericAlertPopup('srv_missing_value_not_empty');
}
}
@@ -126,7 +126,7 @@ function addSurveyMissingValueConfirm() {
$('#fullscreen').fadeOut('slow');
});
} else {
- alert(response);
+ genericAlertPopup('alert_parameter_response',response);
}
});
}
\ No newline at end of file
diff --git a/admin/survey/script/script.js b/admin/survey/script/script.js
index 837089ef6..559834d3e 100644
--- a/admin/survey/script/script.js
+++ b/admin/survey/script/script.js
@@ -935,7 +935,7 @@ function insert_grupa_before(grupa) {
function grupa_recount(prevent_recount) {
if (prevent_recount) {
- $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_grupa_recount_alert_have_branching'}, function(response) { alert(response); return false;});
+ $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_grupa_recount_alert_have_branching'}, function(response) { genericAlertPopup('alert_parameter_response',response); return false;});
} else {
$.redirect('ajax.php?a=grupa_recount', {anketa: srv_meta_anketa_id, grupa: srv_meta_grupa});
}
@@ -1807,7 +1807,7 @@ function grupa_sortable (preventMove) {
stop: function () {
if (preventMove == true) {
$(this).sortable('cancel');
- $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_grupa_move_alert_have_branching'}, function(response) { alert(response); return false;});
+ $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_grupa_move_alert_have_branching'}, function(response) { genericAlertPopup('alert_parameter_response',response); return false;});
} else
$.post('ajax.php?a=vrstnired_grupa', {serialize: $('#grupe').sortable('serialize')});
}
@@ -1844,7 +1844,7 @@ function spremenljivka_sortable (preventMove) {
// {duration: 1});¸
if (preventMove == true) {
$(this).sortable('cancel');
- $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_spremenljivka_move_alert_have_branching'}, function(response) { alert(response); return false;});
+ $.post('ajax.php?a=outputLanguageNote', {anketa: srv_meta_anketa_id, note: 'srv_spremenljivka_move_alert_have_branching'}, function(response) { genericAlertPopup('alert_parameter_response',response); return false;});
} else {
var moved = ui.item.attr('id');
var topage = $("#"+moved).parent().attr('id');
@@ -3444,7 +3444,7 @@ function newAnketaTemplate() {
}
if(ank_id == '' || ank_id < 1){
- alert(lang['srv_newSurvey_survey_template_error']);
+ genericAlertPopup('srv_newSurvey_survey_template_error');
}
else{
$.redirect('ajax.php?t=library&a=anketa_copy_new', {ank_id:ank_id, naslov:naslov, akronim:akronim, folder:folder});
@@ -4367,7 +4367,7 @@ function surveyBaseSettingRadio(what,foreceReload) {
//} else if (data.action == 1) {
}
} else {
- alert(data.msg);
+ genericAlertPopup('alert_parameter_datamsg',data.msg);
}
});
}
@@ -4379,7 +4379,7 @@ function surveyBaseSettingText(what,refresh) {
} else if ($('[name='+what+']').length) {
value = $('[name='+what+']').val();
} else {
- alert('Error while saving!');
+ genericAlertPopup('alert_save_error');
return false;
}
@@ -4392,7 +4392,7 @@ function surveyBaseSettingText(what,refresh) {
// todo show save window
}
} else {
- alert(data.msg);
+ genericAlertPopup('alert_parameter_datamsg',data.msg);
}
});
}
@@ -4469,7 +4469,7 @@ function data_restore(anketa) {
function deleteSurveyDataFile(note) {
if (confirm(note)) {
- $.post('ajax.php?a=deleteSurveyDataFile', {anketa:srv_meta_anketa_id}, function (result) {alert(result)});
+ $.post('ajax.php?a=deleteSurveyDataFile', {anketa:srv_meta_anketa_id}, function (result) {genericAlertPopup('alert_parameter_response',response)});
}
}
function userGlobalSettingChange(what) {
@@ -4482,7 +4482,7 @@ function userGlobalSettingChange(what) {
var state = $(what).is(':checked') ? value : '0';
$.post('ajax.php?t=globalUserSettings', {name:name, value:state}, function (data) {});
} else {
- alert("TODO:userGlobalSettingChange ("+type+")");
+ genericAlertPopup('alert_userGlobalSettingChange',type);
}
}
function changeSurveyLock(what) {
@@ -5236,11 +5236,11 @@ function save1kaRacunSettings(){
}
// Gesla nista enaka
else if(geslo1 != geslo2){
- alert(lang['cms_error_password_incorrect']);
+ genericAlertPopup('cms_error_password_incorrect');
}
// Geslo ni dovolj kompleksno
else if(!complexPassword(geslo1)){
- alert(lang['password_err_complex']);
+ genericAlertPopup('password_err_complex');
}
// Pri popravljanju gesla ga opozorimo, da bo odjavljen
else{
@@ -5542,4 +5542,21 @@ function popupAlertAll(alert_type){
function AlertAllPopupClose(){
$('#popup_note').fadeOut('slow').html('');
$('#fade').fadeOut('slow');
-}
\ No newline at end of file
+}
+
+//Generičen alert popup
+function genericAlertPopup(name, optional_parameter){
+
+ if (optional_parameter === undefined) {
+ optional_parameter = "";
+ }
+
+ $('#fade').fadeTo('slow', 1);
+ $('#popup_note').html('').fadeIn('slow');
+ $("#popup_note").load('ajax.php?a=genericAlertPopup', {name:name, optional_parameter:optional_parameter});
+}
+
+function genericAlertPopupClose(){
+ $('#popup_note').fadeOut('slow').html('');
+ $('#fade').fadeOut('slow');
+}
diff --git a/admin/survey/script/script_analiza.js b/admin/survey/script/script_analiza.js
index c2495f366..33d7ee10e 100644
--- a/admin/survey/script/script_analiza.js
+++ b/admin/survey/script/script_analiza.js
@@ -70,11 +70,11 @@ function analiza_init () {
if (response == '0') {
row.hide();
} else {
- alert(response);
+ genericAlertPopup('alert_parameter_response',response);
}
});
} else {
- alert("Napaka pri brisanju!");
+ genericAlertPopup('alert_delete_error');
}
}
});
@@ -935,7 +935,7 @@ function saveArchiveAnaliza(aid) {
});
} else {
- alert('Napaka!');
+ genericAlertPopup('error');
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -968,7 +968,7 @@ function doDeleteArchiveAnaliza(aid) {
$('#fade').fadeOut('slow');
});
} else {
- alert('Napaka!');
+ genericAlertPopup('error');
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
}
@@ -988,9 +988,9 @@ function createArchiveBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -1205,7 +1205,7 @@ function deleteMultipleData(){
});
} else {
- alert(lang["srv_data_delete_not_selected"]);
+ genericAlertPopup('srv_data_delete_not_selected');
}
}
@@ -1238,11 +1238,11 @@ function quickEditAction(action, usr_id){
var href = srv_site_url+'admin/survey/index.php?anketa='+srv_meta_anketa_id+'&a=data&m=quick_edit';
window.location = href;
} else {
- alert(response);
+ genericAlertPopup('alert_parameter_response',response);
}
});
} else {
- alert("Napaka pri brisanju!");
+ genericAlertPopup('alert_delete_error');
}
}
});
@@ -1305,7 +1305,7 @@ function quickEditAction(action, usr_id){
window.location = href;
});
} else {
- alert("Napaka pri kopiranju!");
+ genericAlertPopup('alert_copy_error');
}
}
});
@@ -1419,7 +1419,7 @@ function doArchiveChart() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveChart() {
@@ -1438,7 +1438,7 @@ function submitArchiveChart() {
$("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -1456,9 +1456,9 @@ function createArchiveChartBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -1466,7 +1466,7 @@ function createArchiveChartBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
diff --git a/admin/survey/script/slideshow.js b/admin/survey/script/slideshow.js
index 52a730b88..440c0f3f4 100644
--- a/admin/survey/script/slideshow.js
+++ b/admin/survey/script/slideshow.js
@@ -19,7 +19,7 @@ function slideshow_reset_interval() {
} else {
// ne moremo resetriat, ker checkbox ni izbran
- alert("Error! Select checkbox");
+ genericAlertPopup('alert_checkbox_error');
}
}
diff --git a/admin/survey/script/statistika.js b/admin/survey/script/statistika.js
index e3ed9a45c..f0ec768bd 100644
--- a/admin/survey/script/statistika.js
+++ b/admin/survey/script/statistika.js
@@ -97,7 +97,7 @@ function renameStatisticProfile() {
if (response > 0) {
$("#statistic_profile .active").html(name);
} else if (response < 0){
- alert("Error!");
+ genericAlertPopup('error');
}
});
}
@@ -145,7 +145,7 @@ function create_new_statistic_interval_filter() {
$("#div_statistic_date_select").load("ajax.php?t=dashboard&a=loadStatisticProfile", {anketa:srv_meta_anketa_id});
} else {
// prišlo je do napake;
- alert(response);
+ genericAlertPopup('alert_parameter_response',response);
}
});
}
diff --git a/admin/survey/script/surveyCondition.js b/admin/survey/script/surveyCondition.js
index 820614ef5..3c7dfdcfd 100644
--- a/admin/survey/script/surveyCondition.js
+++ b/admin/survey/script/surveyCondition.js
@@ -19,7 +19,7 @@ function newSurveyCondition()
}
else
{
- alert('Error! (errCode:'+data.error+')');
+ genericAlertPopup('alert_error_code',data.error);
}
}
)
@@ -47,7 +47,7 @@ function deleteSurveyCondition(cid)
}
else
{
- alert('Error! (errCode:'+data.error+')');
+ genericAlertPopup('alert_error_code',data.error);
}
}
);
@@ -73,7 +73,7 @@ function renameSurveyCondition()
}
else
{
- alert(data.errorMsg+'');
+ genericAlertPopup('alert_parameter_dataerrormsg');
}
}
);
diff --git a/admin/survey/script/surveyList.js b/admin/survey/script/surveyList.js
index 5114042ff..3f6106024 100644
--- a/admin/survey/script/surveyList.js
+++ b/admin/survey/script/surveyList.js
@@ -144,7 +144,7 @@ function surveyList_knjiznica (anketa) {
*
*/
function surveyList_knjiznica_noaccess (msg) {
- alert(msg);
+ genericAlertPopup('alert_parameter_msg');
}
/** doda/odstrani anketo v uporabnisko knjiznico in refresa ikono za knjiznico ankete
diff --git a/admin/survey/script/telephone.js b/admin/survey/script/telephone.js
index 0ae2e3287..f5186ef4c 100644
--- a/admin/survey/script/telephone.js
+++ b/admin/survey/script/telephone.js
@@ -76,10 +76,10 @@ function phn_add_recipients() {
$elm.next().find('a').addClass('active');
$elm.removeClass('inv_ff_left_on').addClass('inv_ff_right_on').next().next().addClass('inv_ff_left_on');
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
return true;
@@ -110,7 +110,7 @@ function phnStartSurvey(usr_id){
window.location = return_data.reloadUrl;
return false;
} else {
- alert(return_data.msg);
+ genericAlertPopup('alert_parameter_datamsg');
}
},
async: false
@@ -208,13 +208,13 @@ function phnGetNewProfileName() {
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=telephone&m=getProfileName', {anketa:srv_meta_anketa_id, recipients_list:recipients_list, fields:fields, noNavi:'true', pid:pid});
} else {
- alert(lang['srv_invitation_note1']);
+ genericAlertPopup('srv_invitation_note1');
}
} else {
- alert(lang['srv_invitation_note2']);
+ genericAlertPopup('srv_invitation_note2');
}
} else {
- alert('Invalid PID!');
+ genericAlertPopup('alert_invalidPID');
}
}
diff --git a/admin/survey/script/timeProfiles.js b/admin/survey/script/timeProfiles.js
index 2382b2ffe..ddaa602ff 100644
--- a/admin/survey/script/timeProfiles.js
+++ b/admin/survey/script/timeProfiles.js
@@ -117,7 +117,7 @@ function timeProfileAction(action) {
var stat_interval = $("#stat_interval").val();
if (type == 1 && stat_interval == '') {
// če je type 1 (intervalni način) in interval ni izbran, damo opozorilo
- alert(lang['srv_time_profile_error_interval']);
+ genericAlertPopup('srv_time_profile_error_interval');
return false;
} else {
$.post("ajax.php?t=timeProfile&a=saveProfile", {anketa:srv_meta_anketa_id, pid:pid, type:type, startDate:startDate,endDate:endDate,stat_interval:stat_interval}, function(response) {
@@ -125,7 +125,7 @@ function timeProfileAction(action) {
});
}
} else {
- alert(action);
+ genericAlertPopup('alert_parameter_action',action);
return false;
}
}
\ No newline at end of file
diff --git a/admin/survey/script/ttest.js b/admin/survey/script/ttest.js
index 1c86adf1a..52ec5e0c2 100644
--- a/admin/survey/script/ttest.js
+++ b/admin/survey/script/ttest.js
@@ -80,7 +80,7 @@ function doArchiveTTest() {
$('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveTTest() {
@@ -97,7 +97,7 @@ function submitArchiveTTest() {
$("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -113,9 +113,9 @@ function createArchiveTTestBeforeEmail() {
});
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -123,6 +123,6 @@ function createArchiveTTestBeforeEmail() {
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
\ No newline at end of file
diff --git a/admin/survey/script/vprasanje.js b/admin/survey/script/vprasanje.js
index 414e49cc8..e8b046464 100644
--- a/admin/survey/script/vprasanje.js
+++ b/admin/survey/script/vprasanje.js
@@ -1625,7 +1625,7 @@ function checkCheckboxLimits(spremenljivka, value, checkbox_limit_name){
//ce je min limit vecji od max limit, je potrebno javiti opozorilo in vrednost min limita dati na 0
//if(min_value > max_value){
if(max_value!=0 && min_value > max_value){
- alert(lang['srv_checkbox_min_limit_error_msg']); //opozorilo v obliki pop-up okna
+ genericAlertPopup('srv_checkbox_min_limit_error_msg'); //opozorilo v obliki pop-up okna
$('#checkbox_min_limit_' + spremenljivka).val(0); //spremeni vrednost min limita na 0 oz. Ne
}
}
diff --git a/admin/survey/script/zankaProfiles.js b/admin/survey/script/zankaProfiles.js
index 9a77e0a09..6db73f682 100644
--- a/admin/survey/script/zankaProfiles.js
+++ b/admin/survey/script/zankaProfiles.js
@@ -92,7 +92,7 @@ function zankaProfileAction(action) {
// ce imamo mnozjenje pustimo max 2 variabli
if ( mnozenje * $("#fs_list_4 li").length > 2) {
- alert(lang['srv_loop_multiplication_error']);
+ genericAlertPopup('srv_loop_multiplication_error');
} else {
$.post('ajax.php?t=zankaProfile&a=run', {anketa: srv_meta_anketa_id, podstran: srv_meta_podstran, data:data, mnozenje:mnozenje, run:action, pid:pid }, function() {
// window.location.reload();
@@ -110,6 +110,6 @@ function zankaProfileAction(action) {
return reloadData();
});
} else {
- alert('Missing action:'+action)
+ genericAlertPopup('alert_missing_action',action)
};
}
\ No newline at end of file
diff --git a/admin/survey/script/zoom.js b/admin/survey/script/zoom.js
index fd9491f01..1b5bd21fd 100644
--- a/admin/survey/script/zoom.js
+++ b/admin/survey/script/zoom.js
@@ -85,7 +85,7 @@ function zoomProfileAction(action) {
//$("#zoom_cover_div").show();
$("#zoom_div div#newProfileDiv").show();
} else {
- alert('Najprej izberite variable');
+ genericAlertPopup('alert_choose_variables');
}
} else if (action == 'newCancel'){
@@ -110,10 +110,10 @@ function zoomProfileAction(action) {
// dropdownu dodamo nov prodil in ga izberemo
//$("#current_condition_profile").append( $("").attr("value", newId).attr( "selected", true).text(name));
} else {
- alert(data.msg);
+ genericAlertPopup('alert_parameter_datamsg',data.msg);
}
} else {
- alert(data.msg);
+ genericAlertPopup('alert_parameter_datamsg',data.msg);
}
});
//$("#zoom_cover_div").hide();
@@ -130,7 +130,7 @@ function zoomProfileAction(action) {
$("#zoom_div div#deleteProfileDiv").hide();
//$("#zoom_cover_div").fadeOut();
} else {
- alert(action);
+ genericAlertPopup('alert_parameter_action',action);
}
}
diff --git a/editors/ckeditor_4_4/plugins/abbr/dialogs/abbr.js b/editors/ckeditor_4_4/plugins/abbr/dialogs/abbr.js
index e2518a965..132ecc80c 100644
--- a/editors/ckeditor_4_4/plugins/abbr/dialogs/abbr.js
+++ b/editors/ckeditor_4_4/plugins/abbr/dialogs/abbr.js
@@ -78,7 +78,7 @@ CKEDITOR.dialog.add( 'abbrDialog', function( editor ) {
'default': 'tooltip mouseover',
validate: function() {
if ( this.getValue() == null ) {
- alert( 'Niste izbrali: Izberite način prikazovanja razlage besede, ki jo bo videl uporabnik ankete.' );
+ genericAlertPopup('alert_word_explanation');
return false;
}
},
diff --git a/editors/ckeditor_4_4/plugins/image/dialogs/image_source_za_urejanje.js b/editors/ckeditor_4_4/plugins/image/dialogs/image_source_za_urejanje.js
index ef3814ed4..2f9c46a0d 100644
--- a/editors/ckeditor_4_4/plugins/image/dialogs/image_source_za_urejanje.js
+++ b/editors/ckeditor_4_4/plugins/image/dialogs/image_source_za_urejanje.js
@@ -598,7 +598,7 @@
var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
isValid = !!( aMatch && parseInt( aMatch[ 1 ], 10 ) !== 0 );
if ( !isValid )
- alert( editor.lang.common.invalidWidth );
+ genericAlertPopup('alert_parameter_editorlang',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 )
- alert( editor.lang.common.invalidHeight );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.common.invalidHeight);
return isValid;
},
setup: setupDimension,
diff --git a/editors/ckeditor_4_4/plugins/link/dialogs/link_source_za_urejanje.js b/editors/ckeditor_4_4/plugins/link/dialogs/link_source_za_urejanje.js
index dc310ce9d..205da8bba 100644
--- a/editors/ckeditor_4_4/plugins/link/dialogs/link_source_za_urejanje.js
+++ b/editors/ckeditor_4_4/plugins/link/dialogs/link_source_za_urejanje.js
@@ -202,7 +202,7 @@
return true;
if ( !editor.config.linkJavaScriptLinksAllowed && ( /javascript\:/ ).test( this.getValue() ) ) {
- alert( commonLang.invalidValue ); // jshint ignore:line
+ genericAlertPopup('alert_parameter_editorlang',commonLang.invalidValue); // jshint ignore:line
return false;
}
diff --git a/editors/ckeditor_4_4/plugins/youtube/plugin.js b/editors/ckeditor_4_4/plugins/youtube/plugin.js
index 658fd05cf..c92871d5d 100644
--- a/editors/ckeditor_4_4/plugins/youtube/plugin.js
+++ b/editors/ckeditor_4_4/plugins/youtube/plugin.js
@@ -54,13 +54,13 @@
{
if ( !this.getValue() )
{
- alert( editor.lang.youtube.noCode );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noCode);
return false;
}
else
if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 )
{
- alert( editor.lang.youtube.invalidEmbed );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidEmbed);
return false;
}
}
@@ -93,7 +93,7 @@
{
if ( !this.getValue() )
{
- alert( editor.lang.youtube.noCode );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noCode);
return false;
}
else{
@@ -101,7 +101,7 @@
if ( this.getValue().length === 0 || video === false)
{
- alert( editor.lang.youtube.invalidUrl );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidUrl );
return false;
}
}
@@ -122,12 +122,12 @@
if ( width === 0 )
{
- alert( editor.lang.youtube.invalidWidth );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidWidth);
return false;
}
}
else {
- alert( editor.lang.youtube.noWidth );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.noWidth);
return false;
}
}
@@ -146,12 +146,12 @@
if ( height === 0 )
{
- alert( editor.lang.youtube.invalidHeight );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidHeight);
return false;
}
}
else {
- alert( editor.lang.youtube.noHeight );
+ genericAlertPopup('alert_parameter_editorlang',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 ) )
{
- alert( editor.lang.youtube.invalidTime );
+ genericAlertPopup('alert_parameter_editorlang',editor.lang.youtube.invalidTime);
return false;
}
}
diff --git a/frontend/drupal/misc/drupal.js b/frontend/drupal/misc/drupal.js
index 7a3f5f592..289536dfb 100644
--- a/frontend/drupal/misc/drupal.js
+++ b/frontend/drupal/misc/drupal.js
@@ -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) {
- alert(message);
+ genericAlertPopup('alert_parameter_text',message);
}
};
diff --git a/frontend/drupal/sites/all/modules/ds/modules/ds_extras/js/ds_extras.js b/frontend/drupal/sites/all/modules/ds/modules/ds_extras/js/ds_extras.js
index f9215bd52..a82760dbd 100644
--- a/frontend/drupal/sites/all/modules/ds/modules/ds_extras/js/ds_extras.js
+++ b/frontend/drupal/sites/all/modules/ds/modules/ds_extras/js/ds_extras.js
@@ -31,7 +31,7 @@ Drupal.behaviors.DSExtrasSwitchViewmode = {
Drupal.attachBehaviors();
}
else {
- alert(data.errorMessage);
+ genericAlertPopup('alert_parameter_dataerrormsg',data.errorMessage);
}
},
error: function (xmlhttp) {
diff --git a/frontend/drupal/sites/all/modules/jquery_update/replace/jquery.form/2/jquery.form.js b/frontend/drupal/sites/all/modules/jquery_update/replace/jquery.form/2/jquery.form.js
index 3ad71f891..9024f20dd 100644
--- a/frontend/drupal/sites/all/modules/jquery_update/replace/jquery.form/2/jquery.form.js
+++ b/frontend/drupal/sites/all/modules/jquery_update/replace/jquery.form/2/jquery.form.js
@@ -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)
- alert('Error: Form elements must not have name or id of "submit".');
+ genericAlertPopup('alert_form_elements');
return;
}
diff --git a/frontend/drupal/sites/all/modules/jquery_update/replace/misc/jquery.form.js b/frontend/drupal/sites/all/modules/jquery_update/replace/misc/jquery.form.js
index 3ad71f891..9024f20dd 100644
--- a/frontend/drupal/sites/all/modules/jquery_update/replace/misc/jquery.form.js
+++ b/frontend/drupal/sites/all/modules/jquery_update/replace/misc/jquery.form.js
@@ -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)
- alert('Error: Form elements must not have name or id of "submit".');
+ genericAlertPopup('alert_form_elements');
return;
}
diff --git a/frontend/drupal/sites/all/modules/nakupovanje_1ka/nakupovanje_1ka_script.js b/frontend/drupal/sites/all/modules/nakupovanje_1ka/nakupovanje_1ka_script.js
index b257627d2..348c4397f 100644
--- a/frontend/drupal/sites/all/modules/nakupovanje_1ka/nakupovanje_1ka_script.js
+++ b/frontend/drupal/sites/all/modules/nakupovanje_1ka/nakupovanje_1ka_script.js
@@ -5,7 +5,7 @@ function CheckEmail(text) {
var Email = jQuery('[name="email"]').val();
if (Email.length > 1 && (Email.search('@') == -1 || Email.indexOf('.') == -1)) {
- alert(text);
+ genericAlertPopup('alert_parameter_text',text);
return false;
}
diff --git a/frontend/drupal/sites/all/modules/picture/ckeditor/plugins/plugin.js b/frontend/drupal/sites/all/modules/picture/ckeditor/plugins/plugin.js
index eb5731afc..ca6232b5d 100644
--- a/frontend/drupal/sites/all/modules/picture/ckeditor/plugins/plugin.js
+++ b/frontend/drupal/sites/all/modules/picture/ckeditor/plugins/plugin.js
@@ -77,7 +77,7 @@
validate: function() {
if (this.getValue() == 'not_set') {
var message = 'Please make a selection from ' + Drupal.settings.picture.label;
- alert(message);
+ genericAlertPopup('alert_parameter_text',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;
- alert(message);
+ genericAlertPopup('alert_parameter_text',message);
return false;
} else {
return true;
diff --git a/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka_script.js b/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka_script.js
index 56a924ff2..e9b0ab887 100644
--- a/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka_script.js
+++ b/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka_script.js
@@ -5,7 +5,7 @@ function CheckEmail(text) {
var Email = jQuery('[name="email"]').val();
if (Email.length > 1 && (Email.search('@') == -1 || Email.indexOf('.') == -1)) {
- alert(text);
+ genericAlertPopup('alert_parameter_text',text);
return false;
}
diff --git a/frontend/simple/script/script.js b/frontend/simple/script/script.js
index f1b0cca9a..085b971fe 100644
--- a/frontend/simple/script/script.js
+++ b/frontend/simple/script/script.js
@@ -10,7 +10,7 @@ function LostPassword(alert_text) {
var email = document.getElementById('em').value;
if (email === '') {
- alert(alert_text);
+ genericAlertPopup('alert_parameter_text',alert_text);
}
else {
diff --git a/lang/1.php b/lang/1.php
index 0455ad0ee..568fc1d08 100644
--- a/lang/1.php
+++ b/lang/1.php
@@ -1628,7 +1628,7 @@ $lang = array (
"cms_error_user_field_empty" => "Polje za vpis imena mora biti izpolnjeno.",
"cms_error_user_took" => "Izbrano ime (vzdevek) je že zasedeno. V polje smo vnesli podobno, a prosto ime.",
"cms_error_recaptcha" => "reCAPTCHA polje ni bilo izpolnjeno ali je bilo neveljavno izpolnjeno",
- "cms_error_password_incorrect" => "Gesli se ne ujemata. Ponvno vnesite geslo.",
+ "cms_error_password_incorrect" => "Gesli se ne ujemata. Ponovno vnesite geslo.",
"cms_error_password" => "Vpisano geslo ni pravilno.",
"cms_error_wrong_email" => "Neveljaven elektronski naslov.",
"cms_error_user_ban" => "Uporabnik je blokiran in prijava ni mogoča.",
@@ -8238,6 +8238,35 @@ $lang = array (
// EXCELLERATION MATRIX //
'srv_excell_matrix_title' => "Matrika odličnosti",
// END EXCELLERATION MATRIX //
+
+ //besedila iz alertov
+ 'alert_no_action_set' => "Izbira ni določena!",
+ 'alert_extensions_match' => "Končnice se morajo ujemati!",
+ 'alert_duplicate_file' => "Podvojena datoteka!",
+ 'alert_no_jscss_found_1' => "Ni nobene datoteke js/css z naslovi URL v ",
+ 'alert_no_jscss_found_2' => ".\n(To orodje je omejeno na URL-je z isto domeno.)",
+ 'alert_no_archive' => "Ni podatkov za arhiv!",
+ 'alert_create_tables' => "Najprej kreirajte tabele.",
+ 'alert_archive_error' => "Napaka pri ustvarjanju arhiva!",
+ 'alert_missing_action' => "Manjkajoča izbira: ",
+ 'alert_deprecated' => "Zastarelo!",
+ 'alert_incorrect_filetype' => "Nepravilna vrsta datoteke!",
+ 'alert_choose_file' => "Izberite datoteko!",
+ 'alert_timeout' => "Prekinitev",
+ 'alert_unknown_error' => "Prišlo je do neznane napake.",
+ 'alert_delete_error' => "Napaka pri brisanju!",
+ 'alert_copy_error' => "Napaka pri kopiranju!",
+ 'alert_save_error' => "Napaka pri shranjevanju!",
+ 'alert_userGlobalSettingChange' => "TODO:userGlobalSettingChange",
+ 'alert_checkbox_error' => "Napaka! Izberite polje.",
+ '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.",
+
+
);
diff --git a/lang/2.php b/lang/2.php
index ee27fd099..f86abbe7f 100644
--- a/lang/2.php
+++ b/lang/2.php
@@ -8133,8 +8133,39 @@ GDPR introduction preview",
// EXCELLERATION MATRIX //
'srv_excell_matrix_title' => "Excelleration matrix",
// END EXCELLERATION MATRIX //
+
+
+ //besedila iz alertov
+ 'alert_no_action_set' => "No action set!",
+ 'alert_extensions_match' => "Extensions must match!",
+ 'alert_duplicate_file' => "Duplicate file!",
+ 'alert_no_jscss_found_1' => "No js/css files found with URLs within ",
+ 'alert_no_jscss_found_2' => ".\n(This tool is limited to URLs with the same domain.)",
+ 'alert_no_archive' => "Nothing to archive!",
+ 'alert_create_tables' => "First, create the tables.",
+ 'alert_archive_error' => "Error while creating archive!",
+ 'alert_missing_action' => "Missing action: ",
+ 'alert_deprecated' => "Deprecated!",
+ 'alert_incorrect_filetype' => "Incorrect file type!",
+ 'alert_choose_file' => "Choose a file!",
+ 'alert_timeout' => "Got timeout",
+ 'alert_unknown_error' => "An unknown error occured.",
+ 'alert_delete_error' => "An error occured while deleting.",
+ 'alert_copy_error' => "An error occured while copying.",
+ 'alert_save_error' => "An error occured while saving.",
+ 'alert_userGlobalSettingChange' => "TODO:userGlobalSettingChange",
+ 'alert_checkbox_error' => "Error! Select checkbox.",
+ '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.",
+
+
+
/* May, spodnji kljuci se pojavijo v 1.php ni pa jih v 2.php
* TODO: dodat v 2.php ali pa odstranit v 1.php
diff --git a/main/survey/js/Maps/Geocoding.js b/main/survey/js/Maps/Geocoding.js
index 727d08600..415981a95 100644
--- a/main/survey/js/Maps/Geocoding.js
+++ b/main/survey/js/Maps/Geocoding.js
@@ -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){
- alert(lang['srv_branching_no_results_geo_map']+': '+address);
+ genericAlertPopup('srv_branching_no_results_geo_map',address);
}
else
console.log('Geocoder error: ' + status);
diff --git a/main/survey/js/Maps/KlikNaMapo.js b/main/survey/js/Maps/KlikNaMapo.js
index 86e6890b6..8d3a14510 100644
--- a/main/survey/js/Maps/KlikNaMapo.js
+++ b/main/survey/js/Maps/KlikNaMapo.js
@@ -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)
- alert(lang['srv_resevanje_alert_location_not_found_map']);
+ genericAlertPopup('srv_resevanje_alert_location_not_found_map');
}
});
}
diff --git a/main/survey/js/Maps/UserLocation.js b/main/survey/js/Maps/UserLocation.js
index a12aa9dc5..d6ce1b91a 100644
--- a/main/survey/js/Maps/UserLocation.js
+++ b/main/survey/js/Maps/UserLocation.js
@@ -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)
- alert(lang['srv_resevanje_alert_location_not_found_map']);
+ genericAlertPopup('srv_resevanje_alert_location_not_found_map');
}
});
}
diff --git a/main/survey/js/script.js b/main/survey/js/script.js
index 7099e78f2..58dcf2530 100644
--- a/main/survey/js/script.js
+++ b/main/survey/js/script.js
@@ -389,7 +389,7 @@ function checkboxLimit (spremenljivka, vrednost, checkbox_limit) {
if (count > checkbox_limit){
document.getElementById('spremenljivka_'+spremenljivka+'_vrednost_'+vrednost).checked = false;
- alert(lang_srv_remind_checkbox_max_violated_hard);
+ genericAlertPopup('srv_remind_checkbox_max_violated_hard');
}
}
@@ -459,7 +459,7 @@ function checkName (spremenljivka, polje){
var index = imena.indexOf(field);
if(index != -1){
polje.value = '';
- alert('Opozorilo: napa\u010Den vpis\r\n\r\nPonovno vpi\u0161ite ime in za\u010Detnico priimka');
+ genericAlertPopup('alert_name_surname');
}
//$('#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 != ''){
- alert(lang_srv_alert_number_exists);
+ genericAlertPopup('srv_alert_number_exists');
field.value = '';
}
if(val > max){
- alert(lang_srv_alert_number_toobig);
+ genericAlertPopup('srv_alert_number_toobig');
field.value = '';
}
}
@@ -1337,7 +1337,7 @@ function cookie_ok () {
function cookie_check() {
if ( $('#cookie_alert').css('display') == 'block' ) {
- alert(lang['srv_cookie_continue_alert']);
+ genericAlertPopup('srv_cookie_continue_alert');
return false;
}
@@ -1909,7 +1909,7 @@ function checkUpload(upload, id){
// File is too large
if(fileSize > maxSize){
$(upload).val(null);
- alert(lang["srv_alert_upload_size"]);
+ genericAlertPopup('srv_alert_upload_size');
return;
}
@@ -1928,7 +1928,7 @@ function checkUpload(upload, id){
// Wrong file extension
if(!extAllowed.includes(fileExt)){
$(upload).val(null);
- alert(lang["srv_alert_upload_ext"]);
+ genericAlertPopup('srv_alert_upload_ext');
return;
}