Upgrade to v26 (#172)

* A bunch of new updates from icehrm pro

* Push changes to frontend
This commit is contained in:
Thilina Hasantha
2019-02-03 14:00:34 +01:00
committed by GitHub
parent a75325fb52
commit 16014bb38e
734 changed files with 131230 additions and 17430 deletions

View File

@@ -1,184 +0,0 @@
var uploadId="";
var uploadAttr="";
var popupUpload = null;
function showUploadDialog(id,msg,group,user,postUploadId,postUploadAttr,postUploadResultAttr,fileType){
var ts = Math.round((new Date()).getTime() / 1000);
uploadId = postUploadId;
uploadAttr = postUploadAttr;
uploadResultAttr = postUploadResultAttr;
var html='<div><iframe src="'+CLIENT_BASE_URL+'fileupload_page.php?id=_id_&msg=_msg_&file_group=_file_group_&file_type=_file_type_&user=_user_" frameborder="0" scrolling="no" width="300px" height="55px"></iframe></div>';
var html = html.replace(/_id_/g,id);
var html = html.replace(/_msg_/g,msg);
var html = html.replace(/_file_group_/g,group);
var html = html.replace(/_user_/g,user);
var html = html.replace(/_file_type_/g,fileType);
modJs.renderModel('upload',"Upload File",html);
$('#uploadModel').modal('show');
}
function closeUploadDialog(success,error,data){
var arr = data.split("|");
var file = arr[0];
var fileBaseName = arr[1];
var fileId = arr[2];
if(success == 1){
//popupUpload.close();
$('#uploadModel').modal('hide');
if(uploadResultAttr == "url"){
if(uploadAttr == "val"){
$('#'+uploadId).val(file);
}else if(uploadAttr == "html"){
$('#'+uploadId).html(file);
}else{
$('#'+uploadId).attr(uploadAttr,file);
}
}else if(uploadResultAttr == "name"){
if(uploadAttr == "val"){
$('#'+uploadId).val(fileBaseName);
}else if(uploadAttr == "html"){
$('#'+uploadId).html(fileBaseName);
$('#'+uploadId).attr("val",fileBaseName);
}else{
$('#'+uploadId).attr(uploadAttr,fileBaseName);
}
$('#'+uploadId).show();
$('#'+uploadId+"_download").show();
$('#'+uploadId+"_remove").show();
}else if(uploadResultAttr == "id"){
if(uploadAttr == "val"){
$('#'+uploadId).attr(uploadAttr,fileId);
}else if(uploadAttr == "html"){
$('#'+uploadId).html(fileBaseName);
$('#'+uploadId).attr("val",fileId);
}else{
$('#'+uploadId).attr(uploadAttr,fileId);
}
$('#'+uploadId).show();
$('#'+uploadId+"_download").show();
$('#'+uploadId+"_remove").show();
}
}else{
//popupUpload.close();
$('#uploadModel').modal('hide');
}
}
function download(name, closeCallback, closeCallbackData){
var successCallback = function(data){
var link;
var fileParts;
var viewableImages = ["png","jpg","gif","bmp","jpge"];
var viewableFiles = ["pdf","xml"];
$('.modal').modal('hide');
if(data['filename'].indexOf("https:") == 0 || data['filename'].indexOf("http:") == 0){
fileParts = data['filename'].split("?");
fileParts = fileParts[0].split(".");
if(jQuery.inArray(fileParts[fileParts.length - 1], viewableFiles ) >= 0) {
var win = window.open(data['filename'], '_blank');
win.focus();
}else{
link = '<a href="'+data['filename']+'" target="_blank">Download File <i class="icon-download-alt"></i> </a>';
if(jQuery.inArray(fileParts[fileParts.length - 1], viewableImages ) >= 0) {
link += '<br/><br/><img style="max-width:545px;max-height:350px;" src="'+data['filename']+'"/>';
}
modJs.showMessage("Download File Attachment",link,closeCallback,closeCallbackData);
}
}else{
fileParts = data['filename'].split(".");
link = '<a href="'+modJs.getCustomActionUrl("download",{'file':data['filename']})+'" target="_blank">Download File <i class="icon-download-alt"></i> </a>';
if(jQuery.inArray(fileParts[fileParts.length - 1], viewableImages ) >= 0) {
link += '<br/><br/><img style="max-width:545px;max-height:350px;" src="'+modJs.getClientDataUrl()+data['filename']+'"/>';
}
modJs.showMessage("Download File Attachment",link,closeCallback,closeCallbackData);
}
};
var failCallback = function(data){
modJs.showMessage("Error Downloading File","File not found");
};
modJs.sendCustomRequest("file",{'name':name},successCallback,failCallback);
}
function randomString(length){
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');
if (! length) {
length = Math.floor(Math.random() * chars.length);
}
var str = '';
for (var i = 0; i < length; i++) {
str += chars[Math.floor(Math.random() * chars.length)];
}
return str;
}
function verifyInstance(key){
var object = {};
object['a'] = "verifyInstance";
object['key'] = key;
$.post(this.baseUrl, object, function(data) {
if(data.status == "SUCCESS"){
$("#verifyModel").hide();
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
alert("Success: Instance Verified");
}else{
alert("Error: "+data.message);
}
},"json");
}
function nl2br(str, is_xhtml) {
// discuss at: http://phpjs.org/functions/nl2br/
// original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Philip Peterson
// improved by: Onno Marsman
// improved by: Atli <20><>r
// improved by: Brett Zamir (http://brett-zamir.me)
// improved by: Maximusya
// bugfixed by: Onno Marsman
// bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// input by: Brett Zamir (http://brett-zamir.me)
// example 1: nl2br('Kevin\nvan\nZonneveld');
// returns 1: 'Kevin<br />\nvan<br />\nZonneveld'
// example 2: nl2br("\nOne\nTwo\n\nThree\n", false);
// returns 2: '<br>\nOne<br>\nTwo<br>\n<br>\nThree<br>\n'
// example 3: nl2br("\nOne\nTwo\n\nThree\n", true);
// returns 3: '<br />\nOne<br />\nTwo<br />\n<br />\nThree<br />\n'
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br ' + '/>' : '<br>'; // Adjust comment to avoid issue on phpjs.org display
return (str + '')
.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');
}
function updateLanguage(language) {
var object = {};
object['a'] = "updateLanguage";
object['language'] = language;
$.post(this.baseUrl, object, function(data) {
if(data.status == "SUCCESS"){
location.reload();
} else {
alert("Error occurred while changing language");
}
},"json");
}

View File

@@ -13,7 +13,7 @@
width: 100px;
height: 100px;
cursor: crosshair;
background-image: url("../img/bootstrap-colorpicker/saturation.png");
background-image: url("img/bootstrap-colorpicker/saturation.png");
}
.colorpicker-saturation i {
@@ -64,12 +64,12 @@
}
.colorpicker-hue {
background-image: url("../img/bootstrap-colorpicker/hue.png");
background-image: url("img/bootstrap-colorpicker/hue.png");
}
.colorpicker-alpha {
display: none;
background-image: url("../img/bootstrap-colorpicker/alpha.png");
background-image: url("img/bootstrap-colorpicker/alpha.png");
}
.colorpicker {
@@ -135,7 +135,7 @@
height: 10px;
margin-top: 5px;
clear: both;
background-image: url("../img/bootstrap-colorpicker/alpha.png");
background-image: url("img/bootstrap-colorpicker/alpha.png");
background-position: 0 100%;
}
@@ -197,11 +197,11 @@
}
.colorpicker.colorpicker-horizontal .colorpicker-hue {
background-image: url("../img/bootstrap-colorpicker/hue-horizontal.png");
background-image: url("img/bootstrap-colorpicker/hue-horizontal.png");
}
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
background-image: url("../img/bootstrap-colorpicker/alpha-horizontal.png");
background-image: url("img/bootstrap-colorpicker/alpha-horizontal.png");
}
.colorpicker.colorpicker-hidden {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,3 +0,0 @@
/* Downloadify 0.2 (c) 2009 by Douglas Neiner. Licensed under the MIT license */
/* See http://github.com/dcneiner/Downloadify for license and more info */
(function(){Downloadify=window.Downloadify={queue:{},uid:new Date().getTime(),getTextForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getData();return""},getFileNameForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getFilename();return""},getDataTypeForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getDataType();return""},saveComplete:function(a){var b=Downloadify.queue[a];if(b)b.complete();return true},saveCancel:function(a){var b=Downloadify.queue[a];if(b)b.cancel();return true},saveError:function(a){var b=Downloadify.queue[a];if(b)b.error();return true},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){if(a.id=="")a.id='downloadify_'+Downloadify.uid++;return a.id}};Downloadify.create=function(a,b){var c=(typeof(a)=="string"?document.getElementById(a):a);return new Downloadify.Container(c,b)};Downloadify.Container=function(d,e){var f=this;f.el=d;f.enabled=true;f.dataCallback=null;f.filenameCallback=null;f.data=null;f.filename=null;var g=function(){f.options=e;if(!f.options.append)f.el.innerHTML="";f.flashContainer=document.createElement('span');f.el.appendChild(f.flashContainer);f.queue_name=Downloadify.getUID(f.flashContainer);if(typeof(f.options.filename)==="function")f.filenameCallback=f.options.filename;else if(f.options.filename)f.filename=f.options.filename;if(typeof(f.options.data)==="function")f.dataCallback=f.options.data;else if(f.options.data)f.data=f.options.data;var a={queue_name:f.queue_name,width:f.options.width,height:f.options.height};var b={allowScriptAccess:'always'};var c={id:f.flashContainer.id,name:f.flashContainer.id};if(f.options.enabled===false)f.enabled=false;if(f.options.transparent===true)b.wmode="transparent";if(f.options.downloadImage)a.downloadImage=f.options.downloadImage;swfobject.embedSWF(f.options.swf,f.flashContainer.id,f.options.width,f.options.height,"10",null,a,b,c);Downloadify.addToQueue(f)};f.enable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(true);f.enabled=true};f.disable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(false);f.enabled=false};f.getData=function(){if(!f.enabled)return"";if(f.dataCallback)return f.dataCallback();else if(f.data)return f.data;else return""};f.getFilename=function(){if(f.filenameCallback)return f.filenameCallback();else if(f.filename)return f.filename;else return""};f.getDataType=function(){if(f.options.dataType)return f.options.dataType;return"string"};f.complete=function(){if(typeof(f.options.onComplete)==="function")f.options.onComplete()};f.cancel=function(){if(typeof(f.options.onCancel)==="function")f.options.onCancel()};f.error=function(){if(typeof(f.options.onError)==="function")f.options.onError()};g()};Downloadify.defaultOptions={swf:'media/downloadify.swf',downloadImage:'images/download.png',width:100,height:30,transparent:true,append:false,dataType:"string"}})();if(typeof(jQuery)!="undefined"){(function($){$.fn.downloadify=function(b){return this.each(function(){b=$.extend({},Downloadify.defaultOptions,b);var a=Downloadify.create(this,b);$(this).data('Downloadify',a)})}})(jQuery)};if(typeof(MooTools)!='undefined'){Element.implement({downloadify:function(a){a=$merge(Downloadify.defaultOptions,a);return this.store('Downloadify',Downloadify.create(this,a))}})};

File diff suppressed because one or more lines are too long

View File

@@ -105,7 +105,7 @@ html[dir="rtl"] .select2-container .select2-choice > .select2-chosen {
text-decoration: none;
border: 0;
background: url('select2.png') right top no-repeat;
background: url(' img/select2/select2.png') right top no-repeat;
cursor: pointer;
outline: 0;
}
@@ -218,7 +218,7 @@ html[dir="rtl"] .select2-container .select2-choice .select2-arrow {
display: block;
width: 100%;
height: 100%;
background: url('select2.png') no-repeat 0 1px;
background: url(' img/select2/select2.png') no-repeat 0 1px;
}
html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
@@ -256,21 +256,21 @@ html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
-webkit-box-shadow: none;
box-shadow: none;
background: #fff url('select2.png') no-repeat 100% -22px;
background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
background: #fff url(' img/select2/select2.png') no-repeat 100% -22px;
background: url(' img/select2/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url(' img/select2/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
}
html[dir="rtl"] .select2-search input {
padding: 4px 5px 4px 20px;
background: #fff url('select2.png') no-repeat -37px -22px;
background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
background: #fff url(' img/select2/select2.png') no-repeat -37px -22px;
background: url(' img/select2/select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url(' img/select2/select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
}
.select2-drop.select2-drop-above .select2-search input {
@@ -278,11 +278,11 @@ html[dir="rtl"] .select2-search input {
}
.select2-search input.select2-active {
background: #fff url('select2-spinner.gif') no-repeat 100%;
background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
background: #fff url(' img/select2/select2-spinner.gif') no-repeat 100%;
background: url(' img/select2/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url(' img/select2/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url(' img/select2/select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
}
.select2-container-active .select2-choice,
@@ -451,7 +451,7 @@ disabled look for disabled choices in the results dropdown
}
.select2-more-results.select2-active {
background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
background: #f4f4f4 url(' img/select2/select2-spinner.gif') no-repeat 100%;
}
.select2-results .select2-ajax-error {
@@ -551,7 +551,7 @@ html[dir="rtl"] .select2-container-multi .select2-choices li
}
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
background: #fff url('select2-spinner.gif') no-repeat 100% !important;
background: #fff url(' img/select2/select2-spinner.gif') no-repeat 100% !important;
}
.select2-default {
@@ -610,7 +610,7 @@ html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
font-size: 1px;
outline: none;
background: url('select2.png') right top no-repeat;
background: url(' img/select2/select2.png') right top no-repeat;
}
html[dir="rtl"] .select2-search-choice-close {
right: auto;
@@ -693,7 +693,7 @@ html[dir="rtl"] .select2-container-multi .select2-search-choice-close {
.select2-search-choice-close,
.select2-container .select2-choice abbr,
.select2-container .select2-choice .select2-arrow b {
background-image: url('select2x2.png') !important;
background-image: url('img/select2/select2x2.png') !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important;
}