Popup alerti

This commit is contained in:
tejagerjovic 2021-11-05 08:06:00 +01:00
parent 4a040cbf16
commit fef494e966
55 changed files with 562 additions and 177 deletions

View File

@ -4408,7 +4408,7 @@ class SurveyAdmin
} else {
echo '
<script language="javascript">
alert(\'' . $lang['srv_filealert'] . '\');
genericAlertPopup(\'srv_filealert\');
</script>
';

View File

@ -6429,7 +6429,318 @@ class SurveyAdminAjax {
.'"><a class="ovalbutton ovalbutton_gray" href="ajax.php?a=reminder_all&what='.$alert_type.'&anketa='.$this->anketa.'"><span>'
.$lang['srv_tip_sample_t6_8_o2'].'</span></a></span>';
echo '</div>';
}
}
// Generičen alert popup
private function ajax_genericAlertPopup(){
global $lang;
$name = $_POST['name'];
$optional_parameter = $_POST['optional_parameter'];
// Generičen alert popup - vsebina
echo '<h2>'.$lang['srv_warning'].'</h2>';
echo '<div class="popup_content">';
switch ($name) {
//branching.js
case 'srv_unlock_popup2':
echo $lang['srv_unlock_popup2'];
break;
case 'srv_unlock_popup3':
echo $lang['srv_unlock_popup3'];
echo $optional_parameter;
break;
//_index.js
case 'alert_extensions_match':
echo $lang['alert_extensions_match'];
break;
//bm.js
case 'alert_no_jscss_found':
echo $lang['alert_no_jscss_found_1'];
echo $optional_parameter;
echo $lang['alert_no_jscss_found_2'];
break;
//hierarhija_analize.js, break.js, cReport.js, crosstab.js, means.js, script_analiza.js, ttest.js
case 'alert_no_archive_tables':
echo $lang['alert_no_archive'];
echo ' ';
echo $lang['alert_create_tables'];
break;
case 'alert_no_archive_response':
echo $lang['alert_no_archive'];
echo $optional_parameter;
break;
case 'alert_archive_error_response':
echo $lang['alert_archive_error'];
echo $optional_parameter;
break;
//MAZA.js
case 'srv_resevanje_alert_location_not_found_map':
echo $lang['srv_resevanje_alert_location_not_found_map'];
break;
//appendMerge.js, invitations.js, telephone.js
case 'srv_invitation_note1':
echo $lang['srv_invitation_note1'];
break;
case 'srv_invitation_note2':
echo $lang['srv_invitation_note2'];
break;
//charts.js
case 'srv_chart_num_limit_warning':
echo $lang['srv_chart_num_limit_warning'];
break;
//collectData.js
case 'srv_collectdata_failed':
echo $lang['srv_collectdata_failed'];
break;
//conditionProfiles.js, script_analiza.js, statistika.js, zankaProfiles.js
case 'error':
echo $lang['error'];
echo "!";
break;
case 'alert_missing_action':
echo $lang['alert_missing_action'];
echo $optional_parameter;
break;
//dataSettingsProfiles.js, missingProfiles.js, timeProfiles.js, zoom.js
case 'alert_parameter_action':
echo $optional_parameter;
break;
//invitations.js
case 'alert_deprecated':
echo $lang['alert_deprecated'];
break;
case 'alert_parameter_dataerror':
echo $optional_parameter;
break;
case 'alert_parameter_profilename':
echo $optional_parameter;
break;
case 'alert_incorrect_filetype':
echo $lang['alert_incorrect_filetype'];
break;
case 'alert_choose_file':
echo $lang['alert_choose_file'];
break;
//LanguageTechnology.js, LanguageTechnology_old, missingProfiles.js, missingValues.js, script_analiza.js, scripts.js
case 'alert_parameter_response':
echo $optional_parameter;
break;
case 'alert_timeout':
echo $lang['alert_timeout'];
break;
case 'alert_unknown_error':
echo $lang['alert_unknown_error'];
break;
//missingvalues.js
case 'srv_missing_value_not_empty':
echo $lang['srv_missing_value_not_empty'];
break;
//script_analiza.js
case 'alert_delete_error':
echo $lang['alert_delete_error'];
break;
case 'srv_data_delete_not_selected':
echo $lang['srv_data_delete_not_selected'];
break;
case 'alert_copy_error':
echo $lang['alert_copy_error'];
break;
//scripts.js, telephone.js
case 'srv_newSurvey_survey_template_error':
echo $lang['srv_newSurvey_survey_template_error'];
break;
case 'alert_parameter_datamsg':
echo $optional_parameter;
break;
case 'alert_save_error':
echo $lang['alert_save_error'];
break;
case 'alert_userGlobalSettingChange':
echo $lang['alert_userGlobalSettingChange'];
echo ' (';
echo $optional_parameter;
echo ')';
break;
case 'cms_error_password_incorrect':
echo $lang['cms_error_password_incorrect'];
break;
case 'password_err_complex':
echo $lang['password_err_complex'];
break;
//slideshow.js
case 'alert_checkbox_error':
echo $lang['alert_checkbox_error'];
break;
//surveyCondition.js, ds_extras.js
case 'alert_error_code':
echo $lang['alert_error_code'];
echo $optional_parameter;
break;
case 'alert_parameter_dataerrormsg':
echo $optional_parameter;
break;
//surveyList.js
case 'alert_parameter_msg':
echo $optional_parameter;
break;
//telephone.js
case 'alert_invalidPID':
echo $lang['alert_invalidPID'];
break;
//timeProfiles.js
case 'srv_time_profile_error_interval':
echo $lang['srv_time_profile_error_interval'];
break;
//vprasanje.js
case 'srv_checkbox_min_limit_error_msg':
echo $lang['srv_checkbox_min_limit_error_msg'];
break;
//zankaProfiles
case 'srv_loop_multiplication_error':
echo $lang['srv_loop_multiplication_error'];
break;
//zoom.js
case 'alert_choose_variables':
echo $lang['alert_choose_variables'];
break;
//calendar.js, drupal.js, nakupovanje_1ka_script.js,plugin.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'];
break;
//SurveyAdminSettings.php
case 'srv_anketa_noactive2':
echo $lang['srv_anketa_noactive2'];
break;
//class.SurveyCondition.php
case 'alert_no_action_set':
echo $lang['alert_no_action_set'];
break;
}
echo '</div>';
echo '<div class="buttons_holder">';
echo '<span class="buttonwrapper floatRight" style="margin:3px" title="'.'OK'.'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="genericAlertPopupClose(); return false;"><span>'
.'OK'.'</span></a></span>';
echo '</div>';
}
}
?>

View File

@ -280,9 +280,8 @@ class SurveyAdminSettings {
echo '<span class="nastavitveSpan3 bold">'.$lang['srv_opozorilo_vprasanja'].':</span>&nbsp;
<a href="#" onClick="popupAlertAll(\'soft\')">'.$lang['srv_soft_reminder_all'].'</a>,
<a hhref="#" onClick="popupAlertAll(\'hard\')">'.$lang['srv_hard_reminder_all'].'</a>,
<a hhref="#" onClick="popupAlertAll(\'no\')">'.$lang['srv_no_reminder_all'].'</a>';
<a href="#" onClick="popupAlertAll(\'hard\')">'.$lang['srv_hard_reminder_all'].'</a>,
<a href="#" onClick="popupAlertAll(\'no\')">'.$lang['srv_no_reminder_all'].'</a>';
echo '<br /><br />';
// Napredni parapodatki
@ -8131,7 +8130,7 @@ class SurveyAdminSettings {
function displayBtnMailtoPreview($row) {
global $lang;
echo '<div class="floatLeft"><div class="buttonwrapper">';
echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="'.( ($row['active'] != 1) ? 'alert(\''.$lang['srv_anketa_noactive2'].'\'); ' : 'preview_mailto_email(); ').'return false;">';
echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="'.( ($row['active'] != 1) ? 'genericAlertPopup(\'srv_anketa_noactive2\'); ' : 'preview_mailto_email(); ').'return false;">';
echo '<span>';
//'<img src="icons/icons/accept.png" alt="" vartical-align="middle" />'
echo $lang['srv_mailto_preview'] . '</span></a></div></div>';

View File

@ -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;

View File

@ -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);
}

View File

@ -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]);
})();

View File

@ -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');
}
});

View File

@ -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');
}
};

View File

@ -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() {

View File

@ -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() {

View File

@ -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');
}
});
});

View File

@ -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');
}
}

View File

@ -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;

View File

@ -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');
}
};

View File

@ -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');
}
};

View File

@ -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) {

View File

@ -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) {

View File

@ -24,7 +24,7 @@ function collectDataAjax(){
location.reload();
}
else{
alert(lang['srv_collectdata_failed']);
genericAlertPopup('srv_collectdata_failed');
}
}
});

View File

@ -54,7 +54,7 @@ function conditionProfileAction(action) {
// dropdownu dodamo nov prodil in ga izberemo
$("#current_condition_profile").append( $("<option></option>").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)};
}

View File

@ -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');
}
}

View File

@ -171,7 +171,7 @@ function dataSettingProfileAction(action) {
return reloadData('dataSetting');
});
} else {
alert(action);
genericAlertPopup('alert_parameter_action',action);
return false;
}
}

View File

@ -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');
}
}

View File

@ -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');
}
};

View File

@ -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);
}
}

View File

@ -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);
}
});
}

View File

@ -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');
}
}
//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');
}

View File

@ -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');
}
};

View File

@ -19,7 +19,7 @@ function slideshow_reset_interval() {
} else {
// ne moremo resetriat, ker checkbox ni izbran
alert("Error! Select checkbox");
genericAlertPopup('alert_checkbox_error');
}
}

View File

@ -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);
}
});
}

View File

@ -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');
}
}
);

View File

@ -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

View File

@ -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');
}
}

View File

@ -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;
}
}

View File

@ -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');
}
};

View File

@ -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
}
}

View File

@ -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)
};
}

View File

@ -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( $("<option></option>").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);
}
}

View File

@ -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;
}
},

View File

@ -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,

View File

@ -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;
}

View File

@ -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;
}
}

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) {
alert(message);
genericAlertPopup('alert_parameter_text',message);
}
};

View File

@ -31,7 +31,7 @@ Drupal.behaviors.DSExtrasSwitchViewmode = {
Drupal.attachBehaviors();
}
else {
alert(data.errorMessage);
genericAlertPopup('alert_parameter_dataerrormsg',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)
alert('Error: Form elements must not have name or id of "submit".');
genericAlertPopup('alert_form_elements');
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)
alert('Error: Form elements must not have name or id of "submit".');
genericAlertPopup('alert_form_elements');
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)) {
alert(text);
genericAlertPopup('alert_parameter_text',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;
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;

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)) {
alert(text);
genericAlertPopup('alert_parameter_text',text);
return false;
}

View File

@ -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 {

View File

@ -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.",
);

View File

@ -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

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){
alert(lang['srv_branching_no_results_geo_map']+': '+address);
genericAlertPopup('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)
alert(lang['srv_resevanje_alert_location_not_found_map']);
genericAlertPopup('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)
alert(lang['srv_resevanje_alert_location_not_found_map']);
genericAlertPopup('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;
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;
}