Upgraded to latest icehrm core
This commit is contained in:
@@ -117,6 +117,9 @@ AdapterBase.method('addSuccessCallBack', function(callBackData,serverData, callG
|
||||
});
|
||||
|
||||
AdapterBase.method('addFailCallBack', function(callBackData,serverData) {
|
||||
try{
|
||||
this.closePlainMessage();
|
||||
}catch(e){}
|
||||
this.showMessage("Error saving",serverData);
|
||||
this.trackEvent("addFailed",this.tab,this.table);
|
||||
});
|
||||
@@ -513,6 +516,163 @@ IdNameAdapter.method('getFormFields', function() {
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* ApproveAdminAdapter
|
||||
*/
|
||||
|
||||
function ApproveAdminAdapter(endPoint,tab,filter,orderBy) {
|
||||
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||
}
|
||||
|
||||
ApproveAdminAdapter.inherits(AdapterBase);
|
||||
|
||||
|
||||
ApproveAdminAdapter.method('openStatus', function(id,status) {
|
||||
$('#'+this.itemNameLower+'StatusModel').modal('show');
|
||||
$('#'+this.itemNameLower+'_status').val(status);
|
||||
this.statusChangeId = id;
|
||||
});
|
||||
|
||||
ApproveAdminAdapter.method('closeDialog', function() {
|
||||
$('#'+this.itemNameLower+'StatusModel').modal('hide');
|
||||
});
|
||||
|
||||
ApproveAdminAdapter.method('changeStatus', function() {
|
||||
var status = $('#'+this.itemNameLower+'_status').val();
|
||||
var reason = $('#'+this.itemNameLower+'_reason').val();
|
||||
|
||||
if(status == undefined || status == null || status == ""){
|
||||
this.showMessage("Error", "Please select "+this.itemNameLower+" status");
|
||||
return;
|
||||
}
|
||||
|
||||
var object = {"id":this.statusChangeId,"status":status,"reason":reason};
|
||||
|
||||
var reqJson = JSON.stringify(object);
|
||||
|
||||
var callBackData = [];
|
||||
callBackData['callBackData'] = [];
|
||||
callBackData['callBackSuccess'] = 'changeStatusSuccessCallBack';
|
||||
callBackData['callBackFail'] = 'changeStatusFailCallBack';
|
||||
|
||||
this.customAction('changeStatus','admin='+this.modulePathName,reqJson,callBackData);
|
||||
|
||||
this.closeDialog();
|
||||
this.statusChangeId = null;
|
||||
});
|
||||
|
||||
ApproveAdminAdapter.method('changeStatusSuccessCallBack', function(callBackData) {
|
||||
this.showMessage("Successful", this.itemName + " Request status changed successfully");
|
||||
this.get([]);
|
||||
});
|
||||
|
||||
ApproveAdminAdapter.method('changeStatusFailCallBack', function(callBackData) {
|
||||
this.showMessage("Error", "Error occurred while changing "+this.itemName+" request status");
|
||||
});
|
||||
|
||||
|
||||
|
||||
ApproveAdminAdapter.method('getActionButtonsHtml', function(id,data) {
|
||||
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
|
||||
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
|
||||
var statusChangeButton = '<img class="tableActionButton" src="_BASE_images/run.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Change Status" onclick="modJs.openStatus(_id_);return false;"></img>';
|
||||
|
||||
var html = '<div style="width:80px;">_edit__delete__status_</div>';
|
||||
|
||||
html = html.replace('_status_',statusChangeButton);
|
||||
|
||||
if(this.showDelete){
|
||||
html = html.replace('_delete_',deleteButton);
|
||||
|
||||
}else{
|
||||
html = html.replace('_delete_','');
|
||||
}
|
||||
|
||||
if(this.showEdit){
|
||||
html = html.replace('_edit_',editButton);
|
||||
}else{
|
||||
html = html.replace('_edit_','');
|
||||
}
|
||||
|
||||
html = html.replace(/_id_/g,id);
|
||||
html = html.replace(/_BASE_/g,this.baseUrl);
|
||||
return html;
|
||||
});
|
||||
|
||||
ApproveAdminAdapter.method('isSubProfileTable', function() {
|
||||
if(this.user.user_level == "Admin"){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* ApproveModuleAdapter
|
||||
*/
|
||||
|
||||
function ApproveModuleAdapter(endPoint,tab,filter,orderBy) {
|
||||
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||
}
|
||||
|
||||
ApproveModuleAdapter.inherits(AdapterBase);
|
||||
|
||||
ApproveModuleAdapter.method('cancelRequest', function(id) {
|
||||
var that = this;
|
||||
var object = {};
|
||||
object['id'] = id;
|
||||
|
||||
var reqJson = JSON.stringify(object);
|
||||
|
||||
var callBackData = [];
|
||||
callBackData['callBackData'] = [];
|
||||
callBackData['callBackSuccess'] = 'cancelSuccessCallBack';
|
||||
callBackData['callBackFail'] = 'cancelFailCallBack';
|
||||
|
||||
this.customAction('cancel','modules='+this.modulePathName,reqJson,callBackData);
|
||||
});
|
||||
|
||||
ApproveModuleAdapter.method('cancelSuccessCallBack', function(callBackData) {
|
||||
this.showMessage("Successful", this.itemName + " cancellation request sent");
|
||||
this.get([]);
|
||||
});
|
||||
|
||||
ApproveModuleAdapter.method('cancelFailCallBack', function(callBackData) {
|
||||
this.showMessage("Error Occurred while cancelling "+this.itemName, callBackData);
|
||||
});
|
||||
|
||||
ApproveModuleAdapter.method('getActionButtonsHtml', function(id,data) {
|
||||
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
|
||||
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
|
||||
var requestCancellationButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Cancel '+this.itemName+'" onclick="modJs.cancelRequest(_id_);return false;"></img>';
|
||||
|
||||
var html = '<div style="width:80px;">_edit__delete_</div>';
|
||||
|
||||
if(this.showDelete){
|
||||
if(data[7] == "Approved"){
|
||||
html = html.replace('_delete_',requestCancellationButton);
|
||||
}else{
|
||||
html = html.replace('_delete_',deleteButton);
|
||||
}
|
||||
|
||||
}else{
|
||||
html = html.replace('_delete_','');
|
||||
}
|
||||
|
||||
if(this.showEdit){
|
||||
html = html.replace('_edit_',editButton);
|
||||
}else{
|
||||
html = html.replace('_edit_','');
|
||||
}
|
||||
|
||||
html = html.replace(/_id_/g,id);
|
||||
html = html.replace(/_BASE_/g,this.baseUrl);
|
||||
return html;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* RequestCache
|
||||
@@ -538,7 +698,16 @@ RequestCache.method('getData', function(key) {
|
||||
|
||||
var strData = localStorage.getItem(key);
|
||||
if(strData != undefined && strData != null && strData != ""){
|
||||
return JSON.parse(strData);
|
||||
data = JSON.parse(strData);
|
||||
if(data == undefined || data == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
if(data.status != undefined && data.status != null && data.status != "SUCCESS"){
|
||||
return null;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -550,6 +719,10 @@ RequestCache.method('setData', function(key, data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(data.status != undefined && data.status != null && data.status != "SUCCESS"){
|
||||
return null;
|
||||
}
|
||||
|
||||
var strData = JSON.stringify(data);
|
||||
var strData = localStorage.setItem(key,strData);
|
||||
return strData;
|
||||
|
||||
@@ -411,7 +411,7 @@ IceHRMBase.method('getTableTopButtonHtml', function() {
|
||||
if(html != ""){
|
||||
html += " ";
|
||||
}
|
||||
html+='<button onclick="modJs.showFilters();return false;" class="btn btn-small btn-primary">Fillter <i class="fa fa-filter"></i></button>';
|
||||
html+='<button onclick="modJs.showFilters();return false;" class="btn btn-small btn-primary">Filter <i class="fa fa-filter"></i></button>';
|
||||
html += " ";
|
||||
if(this.filtersAlreadySet){
|
||||
html+='<button id="__id___resetFilters" onclick="modJs.resetFilters();return false;" class="btn btn-small btn-default">__filterString__ <i class="fa fa-times"></i></button>';
|
||||
@@ -445,6 +445,10 @@ IceHRMBase.method('getTableHTMLTemplate', function() {
|
||||
return '<div class="box-body table-responsive"><table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped" id="grid"></table></div>';
|
||||
});
|
||||
|
||||
IceHRMBase.method('isSortable', function() {
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
* Create the data table on provided element id
|
||||
* @method createTable
|
||||
@@ -452,6 +456,9 @@ IceHRMBase.method('getTableHTMLTemplate', function() {
|
||||
*/
|
||||
|
||||
IceHRMBase.method('createTable', function(elementId) {
|
||||
|
||||
|
||||
var that = this;
|
||||
|
||||
if(this.getRemoteTable()){
|
||||
this.createTableServer(elementId);
|
||||
@@ -497,7 +504,7 @@ IceHRMBase.method('createTable', function(elementId) {
|
||||
},
|
||||
"aaData": data,
|
||||
"aoColumns": headers,
|
||||
"bSort": true,
|
||||
"bSort": that.isSortable(),
|
||||
"iDisplayLength": 15,
|
||||
"iDisplayStart": start
|
||||
};
|
||||
@@ -559,7 +566,7 @@ IceHRMBase.method('createTableServer', function(elementId) {
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": that.getDataUrl(that.getDataMapping()),
|
||||
"aoColumns": headers,
|
||||
"bSort": true,
|
||||
"bSort": that.isSortable(),
|
||||
"parent":that,
|
||||
"iDisplayLength": 15,
|
||||
"iDisplayStart": start
|
||||
@@ -683,6 +690,38 @@ IceHRMBase.method('renderModel', function(id,header,body) {
|
||||
$('#'+id+'ModelBody').html(body);
|
||||
});
|
||||
|
||||
|
||||
IceHRMBase.method('renderYesNoModel', function(header,body,yesBtnName,noBtnName,callback, callbackParams) {
|
||||
var that = this;
|
||||
var modelId = "#yesnoModel";
|
||||
|
||||
if(body == undefined || body == null){
|
||||
body = "";
|
||||
}
|
||||
|
||||
$(modelId+'Label').html(header);
|
||||
$(modelId+'Body').html(body);
|
||||
if(yesBtnName != null){
|
||||
$(modelId+'YesBtn').html(yesBtnName);
|
||||
}
|
||||
if(noBtnName != null){
|
||||
$(modelId+'NoBtn').html(noBtnName);
|
||||
}
|
||||
|
||||
$(modelId+'YesBtn').off().on('click',function(){
|
||||
if(callback != undefined && callback != null){
|
||||
callback.apply(that,callbackParams);
|
||||
that.cancelYesno();
|
||||
}
|
||||
});
|
||||
|
||||
$(modelId).modal({
|
||||
backdrop: 'static'
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
IceHRMBase.method('renderModelFromDom', function(id,header,element) {
|
||||
$('#'+id+'ModelBody').html("");
|
||||
|
||||
@@ -746,8 +785,8 @@ IceHRMBase.method('showDomElement', function(title,element,closeCallback,closeCa
|
||||
var that = this;
|
||||
var modelId = "";
|
||||
if(isPlain){
|
||||
modelId = "#plainMessageModel";
|
||||
this.renderModelFromDom('plainMessage',title,element);
|
||||
modelId = "#dataMessageModel";
|
||||
this.renderModelFromDom('dataMessage',title,element);
|
||||
}else{
|
||||
modelId = "#messageModel";
|
||||
this.renderModelFromDom('message',title,element);
|
||||
@@ -781,10 +820,18 @@ IceHRMBase.method('closeMessage', function() {
|
||||
$('#messageModel').modal('hide');
|
||||
});
|
||||
|
||||
IceHRMBase.method('cancelYesno', function() {
|
||||
$('#yesnoModel').modal('hide');
|
||||
});
|
||||
|
||||
IceHRMBase.method('closePlainMessage', function() {
|
||||
$('#plainMessageModel').modal('hide');
|
||||
});
|
||||
|
||||
IceHRMBase.method('closeDataMessage', function() {
|
||||
$('#dataMessageModel').modal('hide');
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Create or edit an element
|
||||
@@ -1435,7 +1482,7 @@ IceHRMBase.method('addDataGroup', function() {
|
||||
|
||||
$("#"+field[0]+"_div").html(html);
|
||||
|
||||
this.closePlainMessage();
|
||||
this.closeDataMessage();
|
||||
|
||||
}
|
||||
});
|
||||
@@ -1482,7 +1529,7 @@ IceHRMBase.method('editDataGroup', function() {
|
||||
|
||||
$("#"+field[0]+"_div").html(html);
|
||||
|
||||
this.closePlainMessage();
|
||||
this.closeDataMessage();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ define('APP_DB', '_APP_DB_');
|
||||
define('APP_USERNAME', '_APP_USERNAME_');
|
||||
define('APP_PASSWORD', '_APP_PASSWORD_');
|
||||
define('APP_HOST', '_APP_HOST_');
|
||||
define('APP_CON_STR', 'mysql://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
|
||||
define('APP_CON_STR', 'mysqli://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
|
||||
|
||||
//file upload
|
||||
define('FILE_TYPES', 'jpg,png,jpeg');
|
||||
|
||||
7
src/app/cron.php
Normal file
7
src/app/cron.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'crons/cron.php');
|
||||
18
src/app/entry.php
Normal file
18
src/app/entry.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
|
||||
header("Location:".CLIENT_BASE_URL."login.php");
|
||||
exit();
|
||||
}
|
||||
$group = $_REQUEST['g'];
|
||||
$name= $_REQUEST['n'];
|
||||
|
||||
$groups = array('admin','modules');
|
||||
|
||||
if($group == 'admin' || $group == 'modules'){
|
||||
$name = str_replace("..","",$name);
|
||||
$name = str_replace("/","",$name);
|
||||
include APP_BASE_PATH.'/'.$group.'/'.$name.'/entry.php';
|
||||
}else{
|
||||
exit();
|
||||
}
|
||||
@@ -21,7 +21,7 @@ $action = $_REQUEST['action'];
|
||||
|
||||
if($action == "TEST_DB"){
|
||||
|
||||
$db = NewADOConnection('mysql');
|
||||
$db = NewADOConnection('mysqli');
|
||||
$res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]);
|
||||
|
||||
if (!$res){
|
||||
@@ -72,7 +72,7 @@ if($action == "TEST_DB"){
|
||||
|
||||
$con = mysql_connect($_REQUEST["APP_HOST"],$_REQUEST["APP_USERNAME"],$_REQUEST["APP_PASSWORD"]);
|
||||
|
||||
$db = NewADOConnection('mysql');
|
||||
$db = NewADOConnection('mysqli');
|
||||
$res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]);
|
||||
|
||||
|
||||
|
||||
18
src/app/update.php
Normal file
18
src/app/update.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
|
||||
header("Location:".CLIENT_BASE_URL."login.php");
|
||||
exit();
|
||||
}
|
||||
$group = $_REQUEST['g'];
|
||||
$name= $_REQUEST['n'];
|
||||
|
||||
$groups = array('admin','modules');
|
||||
|
||||
if($group == 'admin' || $group == 'modules'){
|
||||
$name = str_replace("..","",$name);
|
||||
$name = str_replace("/","",$name);
|
||||
include APP_BASE_PATH.'/'.$group.'/'.$name.'/update.php';
|
||||
}else{
|
||||
exit();
|
||||
}
|
||||
@@ -59,6 +59,11 @@ abstract class AbstractModuleManager{
|
||||
}
|
||||
*/
|
||||
public abstract function setupModuleClassDefinitions();
|
||||
|
||||
|
||||
public function getDashboardItem(){
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function setupRestEndPoints(){
|
||||
|
||||
218
src/classes/ApproveActionManager.php
Normal file
218
src/classes/ApproveActionManager.php
Normal file
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
abstract class ApproveAdminActionManager extends SubActionManager{
|
||||
|
||||
public abstract function getModelClass();
|
||||
public abstract function getItemName();
|
||||
public abstract function getModuleName();
|
||||
public abstract function getModuleTabUrl();
|
||||
|
||||
public function changeStatus($req){
|
||||
|
||||
$class = $this->getModelClass();
|
||||
$itemName = $this->getItemName();
|
||||
|
||||
|
||||
$obj = new $class();
|
||||
$obj->Load("id = ?",array($req->id));
|
||||
|
||||
if($obj->id != $req->id){
|
||||
return new IceResponse(IceResponse::ERROR,"$itemName not found");
|
||||
}
|
||||
|
||||
if($this->user->user_level != 'Admin' && $this->user->user_level != 'Manager'){
|
||||
return new IceResponse(IceResponse::ERROR,"Only an admin or manager can do this");
|
||||
}
|
||||
|
||||
$oldStatus = $obj->status;
|
||||
$obj->status = $req->status;
|
||||
$ok = $obj->Save();
|
||||
if(!$ok){
|
||||
LogManager::getInstance()->info($obj->ErrorMsg());
|
||||
return new IceResponse(IceResponse::ERROR,"Error occurred while saving $itemName information. Please contact admin");
|
||||
}
|
||||
|
||||
$this->baseService->audit(IceConstants::AUDIT_ACTION, "$itemName status changed from:".$oldStatus." to:".$obj->status." id:".$obj->id);
|
||||
|
||||
$currentEmpId = $this->getCurrentProfileId();
|
||||
|
||||
if(!empty($currentEmpId)){
|
||||
$employee = $this->baseService->getElement('Employee',$currentEmpId);
|
||||
|
||||
$notificationMsg = "Your $itemName has been $obj->status by ".$employee->first_name." ".$employee->last_name;
|
||||
if(!empty($req->reason)){
|
||||
$notificationMsg.=" (Note:".$req->reason.")";
|
||||
}
|
||||
|
||||
$this->baseService->notificationManager->addNotification($obj->employee,$notificationMsg,'{"type":"url","url":"'.$this->getModuleTabUrl().'"}',$this->getModuleName(), null, false, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return new IceResponse(IceResponse::SUCCESS,"");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
abstract class ApproveModuleActionManager extends SubActionManager{
|
||||
|
||||
public abstract function getModelClass();
|
||||
public abstract function getItemName();
|
||||
public abstract function getModuleName();
|
||||
public abstract function getModuleTabUrl();
|
||||
|
||||
public function cancel($req){
|
||||
|
||||
$employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true);
|
||||
|
||||
$class = $this->getModelClass();
|
||||
$itemName = $this->getItemName();
|
||||
$obj = new $class();
|
||||
$obj->Load("id = ?",array($req->id));
|
||||
if($obj->id != $req->id){
|
||||
return new IceResponse(IceResponse::ERROR,"$itemName record not found");
|
||||
}
|
||||
|
||||
|
||||
if($this->user->user_level != 'Admin' && $this->getCurrentProfileId() != $obj->employee){
|
||||
return new IceResponse(IceResponse::ERROR,"Only an admin or owner of the $itemName can do this");
|
||||
}
|
||||
|
||||
if($obj->status != 'Approved'){
|
||||
return new IceResponse(IceResponse::ERROR,"Only an approved $itemName can be cancelled");
|
||||
}
|
||||
|
||||
$obj->status = 'Cancellation Requested';
|
||||
$ok = $obj->Save();
|
||||
if(!$ok){
|
||||
LogManager::getInstance()->error("Error occurred while cancelling the $itemName:".$obj->ErrorMsg());
|
||||
return new IceResponse(IceResponse::ERROR,"Error occurred while cancelling the $itemName. Please contact admin.");
|
||||
}
|
||||
|
||||
|
||||
$this->baseService->audit(IceConstants::AUDIT_ACTION, "Expense cancellation | start:".$obj->date_start."| end:".$obj->date_end);
|
||||
$notificationMsg = $employee->first_name." ".$employee->last_name." cancelled a expense. Visit expense management module to approve";
|
||||
|
||||
$this->baseService->notificationManager->addNotification($employee->supervisor,$notificationMsg,'{"type":"url","url":"'.$this->getModuleTabUrl().'"}',
|
||||
$this->getModuleTabUrl(), null, false, true);
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class ApproveModel extends ICEHRM_Record {
|
||||
|
||||
public function executePreSaveActions($obj){
|
||||
$preApprove = SettingsManager::getInstance()->getSetting($this->preApproveSettingName);
|
||||
$sendNotificationEmail = true;
|
||||
if(empty($obj->status)){
|
||||
if($preApprove == "1"){
|
||||
$obj->status = "Approved";
|
||||
$sendNotificationEmail = false;
|
||||
}else{
|
||||
$obj->status = "Pending";
|
||||
}
|
||||
}
|
||||
|
||||
if($preApprove){
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
|
||||
$currentEmpId = BaseService::getInstance()->getCurrentProfileId();
|
||||
|
||||
//Auto approve if the current user is an admin
|
||||
|
||||
if(!empty($currentEmpId)){
|
||||
$employee = BaseService::getInstance()->getElement('Employee',$currentEmpId);
|
||||
|
||||
if(!empty($employee->supervisor)) {
|
||||
$notificationMsg = "A new ".$this->notificationUnitName." has been added by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it";
|
||||
|
||||
BaseService::getInstance()->notificationManager->addNotification($employee->supervisor, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, null, false, $sendNotificationEmail);
|
||||
}else{
|
||||
|
||||
$user = BaseService::getInstance()->getCurrentUser();
|
||||
|
||||
if($user->user_level == "Admin"){
|
||||
//Auto approve
|
||||
$obj->status = "Approved";
|
||||
$notificationMsg = "Your ".$this->notificationUnitName." is auto approved since you are an administrator and do not have any supervisor assigned";
|
||||
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, $user->id, false, $sendNotificationEmail);
|
||||
}else{
|
||||
//If the user do not have a supervisor, notify all admins
|
||||
$admins = BaseService::getInstance()->getAllAdmins();
|
||||
foreach($admins as $admin){
|
||||
$notificationMsg = "A new ".$this->notificationUnitName." has been added by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it. You are getting this notification since you are an administrator and the user do not have any supervisor assigned.";
|
||||
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, $admin->id, false, $sendNotificationEmail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
|
||||
public function executePreUpdateActions($obj){
|
||||
|
||||
$preApprove = SettingsManager::getInstance()->getSetting($this->preApproveSettingName);
|
||||
$sendNotificationEmail = true;
|
||||
|
||||
$fieldsToCheck = $this->fieldsNeedToBeApproved();
|
||||
|
||||
$travelRequest = new EmployeeTravelRecord();
|
||||
$travelRequest->Load('id = ?',array($obj->id));
|
||||
|
||||
$needToApprove = false;
|
||||
if($preApprove != "1"){
|
||||
foreach($fieldsToCheck as $field){
|
||||
if($obj->$field != $travelRequest->$field) {
|
||||
$needToApprove = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$sendNotificationEmail = false;
|
||||
}
|
||||
|
||||
if($preApprove){
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
|
||||
if($needToApprove && $obj->status != 'Pending'){
|
||||
$currentEmpId = BaseService::getInstance()->getCurrentProfileId();
|
||||
|
||||
//Auto approve if the current user is an admin
|
||||
|
||||
if(!empty($currentEmpId)){
|
||||
$employee = BaseService::getInstance()->getElement('Employee',$currentEmpId);
|
||||
|
||||
if(!empty($employee->supervisor)) {
|
||||
$notificationMsg = $this->notificationUnitPrefix." ".$this->notificationUnitName." has been updated by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it";
|
||||
|
||||
BaseService::getInstance()->notificationManager->addNotification($employee->supervisor, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, null, false, $sendNotificationEmail);
|
||||
}else{
|
||||
|
||||
$user = BaseService::getInstance()->getCurrentUser();
|
||||
|
||||
if($user->user_level == "Admin"){
|
||||
|
||||
}else{
|
||||
//If the user do not have a supervisor, notify all admins
|
||||
$admins = BaseService::getInstance()->getAllAdmins();
|
||||
foreach($admins as $admin){
|
||||
$notificationMsg = $this->notificationUnitPrefix." ".$this->notificationUnitName." request has been updated by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it. You are getting this notification since you are an administrator and the user do not have any supervisor assigned.";
|
||||
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"g=admin&n=travel&m=admin_Employees"}', "Travel Module", $admin->id, false, $sendNotificationEmail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
}
|
||||
@@ -1103,6 +1103,30 @@ class BaseService{
|
||||
$data = $customField->Find("type = ?",array($type));
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getAllAdmins(){
|
||||
$user = new User();
|
||||
$admins = $user->Find('user_level = ?',array('Admin'));
|
||||
return $admins;
|
||||
}
|
||||
|
||||
public function getCurrentEmployeeTimeZone(){
|
||||
$cemp = $this->getCurrentProfileId();
|
||||
if(empty($cemp)){
|
||||
return NULL;
|
||||
}
|
||||
$emp = new Employee();
|
||||
$emp->Load("id = ?",array($cemp));
|
||||
if(empty($emp->id) || empty($emp->department)){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
$dept = new CompanyStructure();
|
||||
$dept->Load("id = ?",array($emp->department));
|
||||
|
||||
return $dept->timezone;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class IceConstants{
|
||||
|
||||
@@ -6,7 +6,7 @@ class CronUtils{
|
||||
private static $me = null;
|
||||
|
||||
private function __construct($clientBasePath, $cronFile){
|
||||
$this->clientBasePath = $clientBasePath;
|
||||
$this->clientBasePath = $clientBasePath."/";
|
||||
$this->cronFile = $cronFile;
|
||||
}
|
||||
|
||||
@@ -20,14 +20,178 @@ class CronUtils{
|
||||
|
||||
public function run(){
|
||||
$ams = scandir($this->clientBasePath);
|
||||
|
||||
$count = 0;
|
||||
foreach($ams as $am){
|
||||
if(is_dir($this->clientBasePath.$am) && $am != '.' && $am != '..'){
|
||||
$command = "php ".$this->cronFile." -c".$this->clientBasePath.$am;
|
||||
//$command = "php ".$this->cronFile." -c".$this->clientBasePath.$am;
|
||||
$command = "php ".$this->clientBasePath.$am."/".$this->cronFile;
|
||||
echo "Run:".$command."\r\n";
|
||||
passthru($command, $res);
|
||||
echo "Result :".$res."\r\n";
|
||||
|
||||
$count++;
|
||||
if($count > 25){
|
||||
sleep(1);
|
||||
$count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class IceCron{
|
||||
|
||||
const MINUTELY = "Minutely";
|
||||
const HOURLY = "Hourly";
|
||||
const DAILY = "Daily";
|
||||
const WEEKLY = "Weekly";
|
||||
const MONTHLY = "Monthly";
|
||||
const YEARLY = "Yearly";
|
||||
|
||||
private $cron;
|
||||
|
||||
public function __construct($cron){
|
||||
$this->cron = $cron;
|
||||
}
|
||||
|
||||
public function isRunNow(){
|
||||
LogManager::getInstance()->debug("Cron ".print_r($this->cron,true));
|
||||
$lastRunTime = $this->cron->lastrun;
|
||||
if(empty($lastRunTime)){
|
||||
LogManager::getInstance()->debug("Cron ".$this->cron->name." is running since last run time is empty");
|
||||
return true;
|
||||
}
|
||||
|
||||
$type = $this->cron->type;
|
||||
$frequency = intval($this->cron->frequency);
|
||||
$time = intval($this->cron->time);
|
||||
|
||||
if(empty($frequency) || !is_int($frequency)){
|
||||
LogManager::getInstance()->debug("Cron ".$this->cron->name." is not running since frequency is not an integer");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if($type == self::MINUTELY){
|
||||
|
||||
$diff = (strtotime("now") - strtotime($lastRunTime));
|
||||
if(empty($this->time) || !is_int($time)){
|
||||
if($diff > 60){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if($diff > 60 * $time){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}else if($type == self::HOURLY){
|
||||
if(empty($time) || !is_int($time)){
|
||||
|
||||
if(date('H') != date('H',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if(intval(date('m')) <= intval($time) && date('H') != date('H',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else if($type == self::DAILY){
|
||||
if(empty($time) || !is_int($time)){
|
||||
|
||||
if(date('d') != date('d',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if(intval(date('H')) <= intval($time) && date('d') != date('d',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else if($type == self::MONTHLY){
|
||||
if(empty($time) || !is_int($time)){
|
||||
|
||||
if(date('m') != date('m',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if(intval(date('d')) <= intval($time) && date('m') != date('m',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else if($type == self::YEARLY){
|
||||
if(empty($time) || !is_int($time)){
|
||||
if(date('Y') != date('Y',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if(intval(date('m')) <= intval($time) && date('Y') != date('Y',strtotime($lastRunTime))){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function execute(){
|
||||
$class = $this->cron->class;
|
||||
$obj = new $class();
|
||||
$obj->execute($this->cron);
|
||||
$this->cronCompleted();
|
||||
}
|
||||
|
||||
|
||||
private function cronCompleted(){
|
||||
$this->cron->lastrun = date("Y-m-d H:i:s");
|
||||
$ok = $this->cron->Save();
|
||||
if(!$ok){
|
||||
LogManager::getInstance()->error("Error saving cron due to :".$this->cron->ErrorMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface IceTask{
|
||||
public function execute($cron);
|
||||
}
|
||||
|
||||
abstract class EmailIceTask implements IceTask{
|
||||
public abstract function execute($cron);
|
||||
|
||||
public function sendEmployeeEmails($emailList, $subject){
|
||||
|
||||
|
||||
foreach($emailList as $employeeId => $emailData){
|
||||
$ccList = array();
|
||||
if(SettingsManager::getInstance()->getSetting('Notifications: Copy Document Expiry Emails to Manager') == '1'){
|
||||
$employee = new Employee();
|
||||
$employee->Load("id = ?",array($employeeId));
|
||||
if(!empty($employee->supervisor)){
|
||||
$supperuser = BaseService::getInstance()->getUserFromProfileId($employee->supervisor);
|
||||
if(!empty($supperuser)){
|
||||
$ccList[] = $supperuser->email;
|
||||
}
|
||||
}
|
||||
}
|
||||
$user = BaseService::getInstance()->getUserFromProfileId($employeeId);
|
||||
if(!empty($user) && !empty($user->email)){
|
||||
$email = new IceEmail();
|
||||
$email->subject = $subject;
|
||||
$email->toEmail = $user->email;
|
||||
$email->template = $emailData;
|
||||
$email->params = '[]';
|
||||
$email->cclist = json_encode($ccList);
|
||||
$email->bcclist = '[]';
|
||||
$email->status = 'Pending';
|
||||
$email->created = date('Y-m-d H:i:s');
|
||||
$email->updated = date('Y-m-d H:i:s');
|
||||
$ok = $email->Save();
|
||||
if(!$ok){
|
||||
LogManager::getInstance()->error("Error Saving Email: ".$email->ErrorMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,56 @@ abstract class EmailSender{
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
public function sendEmailFromNotification($notification){
|
||||
$toEmail = null;
|
||||
$user = new User();
|
||||
$user->Load("id = ?",array($notification->toUser));
|
||||
|
||||
if(!empty($user->email)){
|
||||
$name = "User";
|
||||
$employee = new Employee();
|
||||
$employee->Load("id = ?",array($user->employee));
|
||||
if($employee->id == $user->employee && !empty($employee->id)){
|
||||
$name = $employee->first_name;
|
||||
}
|
||||
|
||||
$action = json_decode($notification->action);
|
||||
|
||||
$emailBody = file_get_contents(APP_BASE_PATH.'/templates/email/notificationEmail.html');
|
||||
$emailBody = str_replace("#_user_#", $name, $emailBody);
|
||||
$emailBody = str_replace("#_message_#", $notification->message, $emailBody);
|
||||
if($action->type == "url"){
|
||||
$emailBody = str_replace("#_url_#", CLIENT_BASE_URL."?".$action->url, $emailBody);
|
||||
}
|
||||
$this->sendEmail('IceHrm Notification from '.$notification->type,
|
||||
$user->email,
|
||||
$emailBody,
|
||||
array(),
|
||||
array(),
|
||||
array()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function sendEmailFromDB($email){
|
||||
$params = array();
|
||||
if(!empty($email->params)){
|
||||
$params = json_decode($email->params, true);
|
||||
}
|
||||
|
||||
$cclist = array();
|
||||
if(!empty($email->cclist)){
|
||||
$cclist = json_decode($email->cclist, true);
|
||||
}
|
||||
|
||||
$bcclist = array();
|
||||
if(!empty($email->bcclist)){
|
||||
$bcclist = json_decode($email->bcclist, true);
|
||||
}
|
||||
|
||||
$resp = $this->sendEmail($email->subject, $email->toEmail, $email->template, $params, $cclist, $bcclist);
|
||||
}
|
||||
|
||||
public function sendEmail($subject, $toEmail, $template, $params, $ccList = array(), $bccList = array()){
|
||||
|
||||
$body = $template;
|
||||
@@ -225,7 +275,7 @@ class SMTPEmailSender extends EmailSender{
|
||||
$mail = $smtp->send($toEmail, $headers, $body);
|
||||
|
||||
|
||||
return true;
|
||||
return $mail;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +305,6 @@ class PHPMailer extends EmailSender{
|
||||
|
||||
LogManager::getInstance()->info("PHP mailer result : ".$res);
|
||||
|
||||
return true;
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,8 @@ class ReportHandler{
|
||||
return $this->executeReport($report,$query,$where[1]);
|
||||
}else if($report->type == 'Class'){
|
||||
$className = $report->query;
|
||||
include MODULE_PATH.'/reportClasses/ReportBuilder.php';
|
||||
include MODULE_PATH.'/reportClasses/'.$className.".php";
|
||||
include APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||
include APP_BASE_PATH.'admin/reports/reportClasses/'.$className.".php";
|
||||
$cls = new $className();
|
||||
$data = $cls->getData($report,$request);
|
||||
return $this->generateReport($report,$data);
|
||||
|
||||
@@ -153,10 +153,27 @@ class UIManager{
|
||||
}
|
||||
|
||||
if($this->user->user_level == "Admin"){
|
||||
|
||||
$reg = '';
|
||||
$num = '';
|
||||
if(class_exists('ProVersion')){
|
||||
$pro = new ProVersion();
|
||||
if(!empty($pro->employeeLimit)){
|
||||
$num = "<br/>Employee Limit: ".$pro->employeeLimit;
|
||||
}
|
||||
|
||||
if(method_exists($pro,'getRegisteredTo')){
|
||||
$reg = "<br/>Registered To: ".$pro->getRegisteredTo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$manuItems[] = new MenuItemTemplate('menuButtonHelp', array(
|
||||
"APP_NAME"=>APP_NAME,
|
||||
"VERSION"=>VERSION,
|
||||
"VERSION_DATE"=>VERSION_DATE
|
||||
"VERSION_DATE"=>VERSION_DATE,
|
||||
"REG"=>$reg,
|
||||
"NUM"=>$num
|
||||
));
|
||||
}
|
||||
|
||||
@@ -199,6 +216,23 @@ class UIManager{
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
public function getCompanyLogoUrl(){
|
||||
$logoFileSet = false;
|
||||
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
|
||||
$logoSettings = SettingsManager::getInstance()->getSetting("Company: Logo");
|
||||
if(!empty($logoSettings)){
|
||||
$logoFileName = FileService::getInstance()->getFileUrl($logoSettings);
|
||||
$logoFileSet = true;
|
||||
}
|
||||
|
||||
if(!$logoFileSet && !file_exists($logoFileName)){
|
||||
return BASE_URL."images/logo.png";
|
||||
}
|
||||
|
||||
return $logoFileName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
23
src/common.cron.tasks.php
Normal file
23
src/common.cron.tasks.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class EmailSenderTask implements IceTask{
|
||||
public function execute($cron){
|
||||
$email = new IceEmail();
|
||||
$emails = $email->Find("status = ? limit 10",array('Pending'));
|
||||
$emailSender = BaseService::getInstance()->getEmailSender();
|
||||
foreach($emails as $email){
|
||||
try{
|
||||
$emailSender->sendEmailFromDB($email);
|
||||
}catch(Exception $e){
|
||||
LogManager::getInstance()->error("Error sending email:".$e->getMessage());
|
||||
}
|
||||
|
||||
$email->status = 'Sent';
|
||||
$email->updated = date('Y-m-d H:i:s');
|
||||
$email->Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
include('common.cron.tasks.ext.php');
|
||||
@@ -9,4 +9,4 @@ if(!defined('SIGN_IN_ELEMENT_MAPPING_FIELD_NAME')){define('SIGN_IN_ELEMENT_MAPPI
|
||||
|
||||
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','ice-framework@gamonoid.com');}
|
||||
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','iCEf');}
|
||||
if(!defined('APP_SEC')){define('APP_SEC','4dcxswfrds');}
|
||||
if(!defined('APP_SEC')){define('APP_SEC','4dcxudersqw');}
|
||||
22
src/crons/cron.php
Normal file
22
src/crons/cron.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
include dirname(__FILE__).'/include.cron.php';
|
||||
|
||||
$cron = new Cron();
|
||||
$crons = $cron->Find("status = ?",array('Enabled'));
|
||||
|
||||
if(!$crons){
|
||||
LogManager::getInstance()->info(CLIENT_NAME." error :".$cron->ErrorMsg());
|
||||
}
|
||||
|
||||
LogManager::getInstance()->info(CLIENT_NAME." cron count :".count($crons));
|
||||
foreach($crons as $cron){
|
||||
$count++;
|
||||
$iceCron = new IceCron($cron);
|
||||
LogManager::getInstance()->info(CLIENT_NAME." check cron :".$cron->name);
|
||||
if($iceCron->isRunNow()){
|
||||
LogManager::getInstance()->info(CLIENT_NAME." execute cron :".$cron->name);
|
||||
$iceCron->execute();
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ $basePath = $opts['p'];
|
||||
|
||||
include (dirname(__FILE__)."/../classes/CronUtils.php");
|
||||
|
||||
$cronUtils = CronUtils::getInstance($basePath, dirname(__FILE__)."/".$file);
|
||||
$cronUtils = CronUtils::getInstance($basePath, $file);
|
||||
|
||||
echo "Cron Runner created \r\n";
|
||||
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
$opts = getopt('c:');
|
||||
$clientPath = $opts['c'];
|
||||
|
||||
if(empty($clientPath)){
|
||||
echo "No client path defined\r\n";
|
||||
exit();
|
||||
}
|
||||
define('CLIENT_PATH',dirname(__FILE__)."/..");
|
||||
|
||||
include (APP_BASE_PATH."config.base.php");
|
||||
|
||||
include $clientPath."/config.php";
|
||||
include (APP_BASE_PATH."include.common.php");
|
||||
include("server.includes.inc.php");
|
||||
include(APP_BASE_PATH."server.includes.inc.php");
|
||||
@@ -407,7 +407,7 @@ table.dataTable{
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.24);
|
||||
}
|
||||
|
||||
|
||||
@@ -457,6 +457,13 @@ table.dataTable{
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
/*
|
||||
@media (min-width:1025px) {
|
||||
.content {
|
||||
min-height: 1100px;
|
||||
}
|
||||
}*/
|
||||
|
||||
.wrapper {
|
||||
background: #FFF;
|
||||
}
|
||||
@@ -481,6 +488,16 @@ table.dataTable{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*custom for v11.0 */
|
||||
|
||||
|
||||
.table-bordered>thead>tr>th{
|
||||
border:none !important;
|
||||
}
|
||||
@@ -499,9 +516,11 @@ table.dataTable{
|
||||
box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.reviewBlock{
|
||||
.reviewBlock{/*
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box
|
||||
box-sizing: border-box*/
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.treeview-menu li:hover{
|
||||
@@ -588,4 +607,48 @@ table.dataTable{
|
||||
|
||||
.fc-toolbar h2{
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.navbar, .right-side{
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.right-side{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-menu {
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
|
||||
border: none;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.treeview.active{
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
|
||||
border: none;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-menu .treeview-menu > li {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.skin-blue .sidebar > .sidebar-menu > li > a:hover, .skin-blue .sidebar > .sidebar-menu > li.active > a {
|
||||
color: #222;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.right-side > .content-header > h1 > small {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
}
|
||||
49
src/entry_footer.php
Normal file
49
src/entry_footer.php
Normal file
@@ -0,0 +1,49 @@
|
||||
</section><!-- /.content -->
|
||||
</aside><!-- /.right-side -->
|
||||
</div><!-- ./wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
for (var prop in modJsList) {
|
||||
if(modJsList.hasOwnProperty(prop)){
|
||||
modJsList[prop].setPermissions(<?=json_encode($modulePermissions['perm'])?>);
|
||||
modJsList[prop].setFieldTemplates(<?=json_encode($fieldTemplates)?>);
|
||||
modJsList[prop].setTemplates(<?=json_encode($templates)?>);
|
||||
modJsList[prop].setCustomTemplates(<?=json_encode($customTemplates)?>);
|
||||
<?php if(isset($emailTemplates)){?>
|
||||
modJsList[prop].setEmailTemplates(<?=json_encode($emailTemplates)?>);
|
||||
<?php } ?>
|
||||
modJsList[prop].setUser(<?=json_encode($user)?>);
|
||||
//Test
|
||||
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new"){?>
|
||||
if(modJsList[prop].newInitObject == undefined || modJsList[prop].newInitObject == null){
|
||||
modJsList[prop].initFieldMasterData(null,modJsList[prop].renderForm);
|
||||
}else{
|
||||
modJsList[prop].initFieldMasterData(null,modJsList[prop].renderForm, modJsList[prop].newInitObject);
|
||||
}
|
||||
<?php }else{?>
|
||||
modJsList[prop].initFieldMasterData(null, modJs.loadingFunction);
|
||||
<?php }?>
|
||||
modJsList[prop].setBaseUrl('<?=BASE_URL?>');
|
||||
modJsList[prop].setCurrentProfile(<?=json_encode($activeProfile)?>);
|
||||
modJsList[prop].setInstanceId('<?=$baseService->getInstanceId()?>');
|
||||
modJsList[prop].setNoJSONRequests('<?=$noJSONRequests?>');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Other static js objects
|
||||
|
||||
var timeUtils = new TimeUtils();
|
||||
timeUtils.setServerGMToffset('<?=$diffHoursBetweenServerTimezoneWithGMT?>');
|
||||
|
||||
var clientUrl = '<?=CLIENT_BASE_URL?>';
|
||||
|
||||
</script>
|
||||
<?php include 'popups.php';?>
|
||||
<?php include APP_BASE_PATH.'js/bootstrapDataTable.php';?>
|
||||
</body>
|
||||
</html>
|
||||
91
src/entry_header.php
Normal file
91
src/entry_header.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
|
||||
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
|
||||
if(!file_exists($logoFileName)){
|
||||
$logoFileUrl = BASE_URL."images/logo.png";
|
||||
}
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$meta->title?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="image_src" href="<?=!empty($meta->imageUrl)?$meta->imageUrl:$logoFileUrl?>"/>
|
||||
<meta property="og:image" content="<?=!empty($meta->imageUrl)?$meta->imageUrl:$logoFileUrl?>"/>
|
||||
<meta property="og:url" content="<?=$meta->url?>"/>
|
||||
<meta property="og:title" content="<?=$meta->title?>"/>
|
||||
<meta property="og:description" content="<?=$meta->description?>"/>
|
||||
|
||||
|
||||
<link href="<?=BASE_URL?>themecss/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>themecss/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>themecss/ionicons.min.css" rel="stylesheet">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?=BASE_URL?>js/jquery2.0.2.min.js"></script>
|
||||
|
||||
<script src="<?=BASE_URL?>themejs/bootstrap.js"></script>
|
||||
<script src="<?=BASE_URL?>js/jquery.placeholder.js"></script>
|
||||
<script src="<?=BASE_URL?>js/base64.js"></script>
|
||||
|
||||
|
||||
<script src="<?=BASE_URL?>js/bootstrap-datepicker.js"></script>
|
||||
<script src="<?=BASE_URL?>js/jquery.timepicker.js"></script>
|
||||
<script src="<?=BASE_URL?>js/bootstrap-datetimepicker.js"></script>
|
||||
<script src="<?=BASE_URL?>js/fullcalendar.min.js"></script>
|
||||
<script src="<?=BASE_URL?>js/select2/select2.min.js"></script>
|
||||
<script src="<?=BASE_URL?>js/bootstrap-colorpicker-2.1.1/js/bootstrap-colorpicker.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<link href="<?=BASE_URL?>themecss/datatables/dataTables.bootstrap.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>css/jquery.timepicker.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>css/datepicker.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>css/fullcalendar.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>js/select2/select2.css" rel="stylesheet">
|
||||
<link href="<?=BASE_URL?>js/bootstrap-colorpicker-2.1.1/css/bootstrap-colorpicker.min.css" rel="stylesheet">
|
||||
|
||||
|
||||
<link href="<?=BASE_URL?>themecss/AdminLTE.css" rel="stylesheet">
|
||||
|
||||
<script src="<?=BASE_URL?>themejs/plugins/datatables/jquery.dataTables.js"></script>
|
||||
<script src="<?=BASE_URL?>themejs/plugins/datatables/dataTables.bootstrap.js"></script>
|
||||
<script src="<?=BASE_URL?>themejs/AdminLTE/app.js"></script>
|
||||
|
||||
|
||||
<link href="<?=BASE_URL?>css/style.css?v=<?=$cssVersion?>" rel="stylesheet">
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?=BASE_URL?>js/date.js"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>js/json2.js"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>js/CrockfordInheritance.v0.1.js"></script>
|
||||
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/Base.js?v=<?=$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/AdapterBase.js?v=<?=$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/FormValidation.js?v=<?=$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/Notifications.js?v=<?=$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/TimeUtils.js?v=<?=$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>api/AesCrypt.js?v=<?=$jsVersion?>"></script>
|
||||
<?php include APP_BASE_PATH.'/modulejslibs.inc.php';?>
|
||||
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var baseUrl = '<?=CLIENT_BASE_URL?>service.php';
|
||||
var CLIENT_BASE_URL = '<?=CLIENT_BASE_URL?>';
|
||||
</script>
|
||||
<script type="text/javascript" src="<?=BASE_URL?>js/app-global.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -10,7 +10,7 @@ include_once ('server.includes.inc.php');
|
||||
/**
|
||||
* Handle file uploads via regular form post (uses the $_FILES array)
|
||||
*/
|
||||
class qqUploadedFileForm {
|
||||
class qqUploadedFileForm {
|
||||
/**
|
||||
* Save the file to the specified path
|
||||
* @return boolean TRUE on success
|
||||
@@ -30,64 +30,64 @@ class qqUploadedFileForm {
|
||||
}
|
||||
|
||||
class qqFileUploader {
|
||||
var $log = null;
|
||||
var $log = null;
|
||||
private $allowedExtensions = array();
|
||||
private $sizeLimit = 10485760;
|
||||
//private $sizeLimit = 2485760;
|
||||
private $file;
|
||||
|
||||
function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){
|
||||
function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){
|
||||
$allowedExtensions = array_map("strtolower", $allowedExtensions);
|
||||
$this->allowedExtensions = $allowedExtensions;
|
||||
$this->allowedExtensions = $allowedExtensions;
|
||||
$this->sizeLimit = $sizeLimit;
|
||||
$this->checkServerSettings();
|
||||
$this->file = new qqUploadedFileForm();
|
||||
$this->checkServerSettings();
|
||||
$this->file = new qqUploadedFileForm();
|
||||
}
|
||||
|
||||
private function checkServerSettings(){
|
||||
|
||||
private function checkServerSettings(){
|
||||
$postSize = $this->toBytes(ini_get('post_max_size'));
|
||||
$uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
|
||||
|
||||
$uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
|
||||
|
||||
/*if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
|
||||
$size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
|
||||
die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
|
||||
}*/
|
||||
$size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
|
||||
die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
private function toBytes($str){
|
||||
$val = trim($str);
|
||||
$last = strtolower($str[strlen($str)-1]);
|
||||
switch($last) {
|
||||
case 'g': $val *= 1024;
|
||||
case 'm': $val *= 1024;
|
||||
case 'k': $val *= 1024;
|
||||
case 'k': $val *= 1024;
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns array('success'=>1) or array('error'=>'error message')
|
||||
*/
|
||||
function handleUpload($uploadDirectory,$saveFileName, $replaceOldFile = FALSE){
|
||||
if (!is_writable($uploadDirectory)){
|
||||
return array('success'=>0,'error' => "Server error. Upload directory isn't writable.");
|
||||
return array('success'=>0,'error' => "Server error. Upload directory ($uploadDirectory) is not writable");
|
||||
}
|
||||
|
||||
|
||||
if (!$this->file){
|
||||
return array('success'=>0,'error' => 'No files were uploaded.');
|
||||
}
|
||||
|
||||
|
||||
$size = $this->file->getSize();
|
||||
LogManager::getInstance()->info('file size ='.$size);
|
||||
LogManager::getInstance()->info('file size limit ='.$this->sizeLimit);
|
||||
if ($size == 0) {
|
||||
return array('success'=>0,'error' => 'File is empty');
|
||||
}
|
||||
|
||||
|
||||
if ($size > $this->sizeLimit) {
|
||||
return array('success'=>0,'error' => 'File is too large');
|
||||
}
|
||||
|
||||
|
||||
$pathinfo = pathinfo($this->file->getName());
|
||||
$filename = $pathinfo['filename'];
|
||||
//$filename = md5(uniqid());
|
||||
@@ -100,18 +100,18 @@ class qqFileUploader {
|
||||
//$filename .= microtime(true);
|
||||
$filename = $saveFileName; // file with only name
|
||||
$saveFileName = $saveFileName.'.'.strtolower($ext); // file with extention
|
||||
|
||||
|
||||
$final_img_location = $uploadDirectory . $saveFileName;
|
||||
|
||||
if ($this->file->save($final_img_location)){
|
||||
$arr = explode("/", $final_img_location);
|
||||
return array('success'=>1,'filename'=>$arr[count($arr)-1],'error'=>'');
|
||||
$arr = explode("/", $final_img_location);
|
||||
return array('success'=>1,'filename'=>$arr[count($arr)-1],'error'=>'');
|
||||
} else {
|
||||
return array('success'=>0,'error'=> 'Could not save uploaded file.' .
|
||||
'The upload was cancelled, or server error encountered');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//Generate File Name
|
||||
$saveFileName = $_POST['file_name'];
|
||||
@@ -119,12 +119,12 @@ $saveFileName = str_replace("..","",$saveFileName);
|
||||
$saveFileName = str_replace("/","",$saveFileName);
|
||||
|
||||
if(stristr($saveFileName,".php")){
|
||||
$saveFileName = str_replace(".php","",$saveFileName);
|
||||
$saveFileName = str_replace(".php","",$saveFileName);
|
||||
}
|
||||
|
||||
if(empty($saveFileName) || $saveFileName == "_NEW_"){
|
||||
$saveFileName = microtime();
|
||||
$saveFileName = str_replace(".", "-", $saveFileName);
|
||||
$saveFileName = microtime();
|
||||
$saveFileName = str_replace(".", "-", $saveFileName);
|
||||
}
|
||||
|
||||
$file = new File();
|
||||
@@ -150,45 +150,45 @@ $uploadedToS3 = false;
|
||||
LogManager::getInstance()->info($uploadFilesToS3."|".$uploadFilesToS3Key."|".$uploadFilesToS3Secret."|".$s3Bucket."|".$s3WebUrl."|".CLIENT_NAME);
|
||||
|
||||
if($uploadFilesToS3.'' == '1' && !empty($uploadFilesToS3Key) && !empty($uploadFilesToS3Secret) &&
|
||||
!empty($s3Bucket) && !empty($s3WebUrl)){
|
||||
|
||||
$localFile = CLIENT_BASE_PATH.'data/'.$result['filename'];
|
||||
|
||||
$f_size = filesize($localFile);
|
||||
$uploadname = CLIENT_NAME."/".$result['filename'];
|
||||
LogManager::getInstance()->info("Upload file to s3:".$uploadname);
|
||||
LogManager::getInstance()->info("Local file:".$localFile);
|
||||
LogManager::getInstance()->info("Local file size:".$f_size);
|
||||
|
||||
|
||||
$s3FileSys = new S3FileSystem($uploadFilesToS3Key, $uploadFilesToS3Secret);
|
||||
$res = $s3FileSys->putObject($s3Bucket, $uploadname, $localFile, 'authenticated-read');
|
||||
|
||||
$file_url = $s3WebUrl.$uploadname;
|
||||
$file_url = $s3FileSys->generateExpiringURL($file_url);
|
||||
LogManager::getInstance()->info("Response from s3 file sys:".print_r($res,true));
|
||||
unlink($localFile);
|
||||
|
||||
$uploadedToS3 = true;
|
||||
!empty($s3Bucket) && !empty($s3WebUrl)){
|
||||
|
||||
$localFile = CLIENT_BASE_PATH.'data/'.$result['filename'];
|
||||
|
||||
$f_size = filesize($localFile);
|
||||
$uploadname = CLIENT_NAME."/".$result['filename'];
|
||||
LogManager::getInstance()->info("Upload file to s3:".$uploadname);
|
||||
LogManager::getInstance()->info("Local file:".$localFile);
|
||||
LogManager::getInstance()->info("Local file size:".$f_size);
|
||||
|
||||
|
||||
$s3FileSys = new S3FileSystem($uploadFilesToS3Key, $uploadFilesToS3Secret);
|
||||
$res = $s3FileSys->putObject($s3Bucket, $uploadname, $localFile, 'authenticated-read');
|
||||
|
||||
$file_url = $s3WebUrl.$uploadname;
|
||||
$file_url = $s3FileSys->generateExpiringURL($file_url);
|
||||
LogManager::getInstance()->info("Response from s3 file sys:".print_r($res,true));
|
||||
unlink($localFile);
|
||||
|
||||
$uploadedToS3 = true;
|
||||
}
|
||||
|
||||
if($result['success'] == 1){
|
||||
$file->name = $saveFileName;
|
||||
$file->filename = $result['filename'];
|
||||
$signInMappingField = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME;
|
||||
$file->$signInMappingField = $_POST['user']=="_NONE_"?null:$_POST['user'];
|
||||
$file->file_group = $_POST['file_group'];
|
||||
$file->Save();
|
||||
if($uploadedToS3){
|
||||
$result['data'] = $file_url;
|
||||
}else{
|
||||
$result['data'] = CLIENT_BASE_URL.'data/'.$result['filename'];
|
||||
}
|
||||
$result['data'] .= "|".$saveFileName;
|
||||
$result['data'] .= "|".$file->id;
|
||||
$file->name = $saveFileName;
|
||||
$file->filename = $result['filename'];
|
||||
$signInMappingField = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME;
|
||||
$file->$signInMappingField = $_POST['user']=="_NONE_"?null:$_POST['user'];
|
||||
$file->file_group = $_POST['file_group'];
|
||||
$file->Save();
|
||||
if($uploadedToS3){
|
||||
$result['data'] = $file_url;
|
||||
}else{
|
||||
$result['data'] = CLIENT_BASE_URL.'data/'.$result['filename'];
|
||||
}
|
||||
$result['data'] .= "|".$saveFileName;
|
||||
$result['data'] .= "|".$file->id;
|
||||
}
|
||||
|
||||
|
||||
echo "<script>parent.closeUploadDialog(".$result['success'].",'".$result['error']."','".$result['data']."');</script>";
|
||||
echo "<script>parent.closeUploadDialog(".$result['success'].",'".$result['error']."','".$result['data']."');</script>";
|
||||
|
||||
|
||||
|
||||
BIN
src/font/roboto/Roboto-Black-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Black-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-BlackItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-BlackItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Bold-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Bold-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-BoldCondensed-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-BoldCondensed-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-BoldCondensedItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-BoldCondensedItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-BoldItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-BoldItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Condensed-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Condensed-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-CondensedItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-CondensedItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Italic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Italic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Light-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Light-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-LightItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-LightItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Medium-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Medium-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-MediumItalic-webfont.eot
Normal file
BIN
src/font/roboto/Roboto-MediumItalic-webfont.eot
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-MediumItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-MediumItalic-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Regular-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Regular-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-Thin-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-Thin-webfont.woff
Normal file
Binary file not shown.
BIN
src/font/roboto/Roboto-ThinItalic-webfont.woff
Normal file
BIN
src/font/roboto/Roboto-ThinItalic-webfont.woff
Normal file
Binary file not shown.
106
src/font/roboto/Roboto.css
Normal file
106
src/font/roboto/Roboto.css
Normal file
@@ -0,0 +1,106 @@
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Regular-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Italic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Bold-webfont.woff') format('woff');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldItalic-webfont.woff') format('woff');
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto Condensed';
|
||||
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-Condensed-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Condensed';
|
||||
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-CondensedItalic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Condensed';
|
||||
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldCondensed-webfont.woff') format('woff');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Condensed';
|
||||
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldCondensedItalic-webfont.woff') format('woff');
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto Thin';
|
||||
src: local('Roboto Thin'), url('https://roboto-webfont.googlecode.com/files/Roboto-Thin-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Thin';
|
||||
src: local('Roboto Thin'), url('https://roboto-webfont.googlecode.com/files/Roboto-ThinItalic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto Light';
|
||||
src: local('Roboto Light'), url('https://roboto-webfont.googlecode.com/files/Roboto-Light-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Light';
|
||||
src: local('Roboto Light'), url('https://roboto-webfont.googlecode.com/files/Roboto-LightItalic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto Medium';
|
||||
src: local('Roboto Medium'), url('https://roboto-webfont.googlecode.com/files/Roboto-Medium-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Medium';
|
||||
src: local('Roboto Medium'), url('https://roboto-webfont.googlecode.com/files/Roboto-MediumItalic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto Black';
|
||||
src: local('Roboto Black'), url('https://roboto-webfont.googlecode.com/files/Roboto-Black-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto Black';
|
||||
src: local('Roboto Black'), url('https://roboto-webfont.googlecode.com/files/Roboto-BlackItalic-webfont.woff') format('woff');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
@@ -23,6 +23,8 @@ Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilin
|
||||
|
||||
include 'includes.inc.php';
|
||||
if(empty($user)){
|
||||
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
SessionUtils::saveSessionObject('loginRedirect',$actual_link);
|
||||
header("Location:".CLIENT_BASE_URL."login.php");
|
||||
}
|
||||
|
||||
@@ -54,6 +56,7 @@ if(!in_array($user->user_level, $modulePermissions['user'])){
|
||||
$commonRoles = array_intersect($modulePermissions['user_roles'], $userRoles);
|
||||
if(empty($commonRoles)){
|
||||
echo "You are not allowed to access this page";
|
||||
header("Location:".CLIENT_BASE_URL."logout.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -193,7 +196,7 @@ include('configureUIManager.php');
|
||||
</header>
|
||||
<div class="wrapper row-offcanvas row-offcanvas-left">
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="left-side sidebar-offcanvas">
|
||||
<aside class="left-side sidebar-offcanvas">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel -->
|
||||
@@ -266,7 +269,7 @@ include('configureUIManager.php');
|
||||
<?=$meta['label']?>
|
||||
<small>
|
||||
<?=$meta['menu']?>
|
||||
<a href="#" class="helpLink" target="_blank" style="display:none;"><i class="glyphicon glyphicon-question-sign"></i></a>
|
||||
<a href="#" class="helpLink" target="_blank" style="display:none;color:#fff;"><i class="glyphicon glyphicon-question-sign"></i></a>
|
||||
</small>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@@ -19,7 +19,7 @@ $_GET = InputCleaner::cleanParameters($_GET);
|
||||
$_POST = InputCleaner::cleanParameters($_POST);
|
||||
|
||||
|
||||
|
||||
date_default_timezone_set('Asia/Colombo');
|
||||
//Find timezone diff with GMT
|
||||
$dateTimeZoneColombo = new DateTimeZone("Asia/Colombo");
|
||||
$dateTimeColombo = new DateTime("now", $dateTimeZoneColombo);
|
||||
|
||||
@@ -46,12 +46,13 @@ if(empty($user)){
|
||||
|
||||
$tuser = SessionUtils::getSessionObject('user');
|
||||
//check user
|
||||
|
||||
/*
|
||||
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
|
||||
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
|
||||
if(!file_exists($logoFileName)){
|
||||
$logoFileUrl = BASE_URL."images/logo.png";
|
||||
}
|
||||
}*/
|
||||
$logoFileUrl = UIManager::getInstance()->getCompanyLogoUrl();
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -89,31 +90,45 @@ if(!file_exists($logoFileName)){
|
||||
padding-top: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 300px;
|
||||
width: 300px;
|
||||
min-height: 0px !important;
|
||||
}
|
||||
|
||||
/* The white background content wrapper */
|
||||
.container > .content {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
margin: 0 -20px;
|
||||
-webkit-border-radius: 10px 10px 10px 10px;
|
||||
-moz-border-radius: 10px 10px 10px 10px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
min-height: 0px !important;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
margin: 0 -20px;
|
||||
-webkit-border-radius:0px;
|
||||
-moz-border-radius:0px;
|
||||
border-radius: 0px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
.login-form {
|
||||
margin-left: 65px;
|
||||
}
|
||||
|
||||
legend {
|
||||
margin-right: -50px;
|
||||
font-weight: bold;
|
||||
color: #404040;
|
||||
}
|
||||
.login-form {
|
||||
margin-left: 65px;
|
||||
}
|
||||
|
||||
legend {
|
||||
margin-right: -50px;
|
||||
font-weight: bold;
|
||||
color: #404040;
|
||||
}
|
||||
|
||||
.add-on{
|
||||
-webkit-border-radius:0px;
|
||||
-moz-border-radius:0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
input{
|
||||
-webkit-border-radius:0px;
|
||||
-moz-border-radius:0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -83,5 +83,13 @@ class RestAccessToken extends ICEHRM_Record {
|
||||
var $_table = 'RestAccessTokens';
|
||||
}
|
||||
|
||||
class Cron extends ICEHRM_Record {
|
||||
var $_table = 'Crons';
|
||||
}
|
||||
|
||||
class IceEmail extends ICEHRM_Record {
|
||||
var $_table = 'Emails';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,42 @@
|
||||
</div>
|
||||
<!-- Plain Message Modal -->
|
||||
|
||||
<!-- Data Message Modal -->
|
||||
<div class="modal fade" id="dataMessageModel" tabindex="-1" role="dialog" aria-labelledby="dataMessageModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="border-bottom:none;/*background-color: #3c8dbc;*/">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="margin-top:-10px;"><li class="fa fa-times"/></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="dataMessageModelBody"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Data Message Modal -->
|
||||
|
||||
<!-- Yes No Modal -->
|
||||
<div class="modal fade" id="yesnoModel" tabindex="-1" role="dialog" aria-labelledby="yesnoModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
|
||||
<h3 id="yesnoModelLabel" style="font-size: 17px;"></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="yesnoModelBody"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="yesnoModelNoBtn" class="btn" onclick="modJs.cancelYesno();">No</button>
|
||||
<button id="yesnoModelYesBtn" class="btn btn-primary">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Yes No Modal -->
|
||||
|
||||
|
||||
<!-- Upload Modal -->
|
||||
<div class="modal fade" id="uploadModel" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -667,6 +667,8 @@ INSERT INTO `Nationality` (`id`, `name`) VALUES
|
||||
|
||||
|
||||
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||
('Company: Logo', '', '','[ "value", {"label":"Logo","type":"fileupload","validation":"none"}]'),
|
||||
('Company: Name', 'Sample Company Pvt Ltd', 'Update your company name - For updating company logo copy a file named logo.png to /app/data/ folder', ''),
|
||||
('Email: Enable', '1', '0 will disable all outgoing emails from modules. Value 1 will enable outgoing emails','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||
('Email: Mode', 'SMTP', 'SMTP, PHP Mailer or Amazon SES. SMTP = send emails using local or a remote smtp server. PHP Mailer = send emails using mail function provided by php. Amazon SES = send emails trough amazon Simple Email Service.','["value", {"label":"Value","type":"select","source":[["SMTP","SMTP"],["PHP Mailer","PHP Mailer"],["SES","Amazon SES"]]}]'),
|
||||
('Email: SMTP Host', 'localhost', 'SMTP host IP',''),
|
||||
|
||||
@@ -204,4 +204,34 @@ create table `Files` (
|
||||
`file_group` varchar(100) NOT NULL,
|
||||
primary key (`id`),
|
||||
unique key `filename` (`filename`)
|
||||
) engine=innodb default charset=utf8;
|
||||
|
||||
create table `Crons` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`class` varchar(100) NOT NULL,
|
||||
`lastrun` DATETIME default '0000-00-00 00:00:00',
|
||||
`frequency` int(4) NOT NULL,
|
||||
`time` varchar(50) NOT NULL,
|
||||
`type` enum('Minutely','Hourly','Daily','Weekly','Monthly','Yearly') default 'Hourly',
|
||||
`status` enum('Enabled','Disabled') default 'Enabled',
|
||||
primary key (`id`),
|
||||
key `KEY_Crons_frequency` (`frequency`)
|
||||
) engine=innodb default charset=utf8;
|
||||
|
||||
create table `Emails` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`subject` varchar(300) NOT NULL,
|
||||
`toEmail` varchar(300) NOT NULL,
|
||||
`template` text NULL,
|
||||
`params` text NULL,
|
||||
`cclist` varchar(500) NULL,
|
||||
`bcclist` varchar(500) NULL,
|
||||
`error` varchar(500) NULL,
|
||||
`created` DATETIME default '0000-00-00 00:00:00',
|
||||
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||
`status` enum('Pending','Sent','Error') default 'Pending',
|
||||
primary key (`id`),
|
||||
key `KEY_Emails_status` (`status`),
|
||||
key `KEY_Emails_created` (`created`)
|
||||
) engine=innodb default charset=utf8;
|
||||
@@ -26,6 +26,7 @@ if(defined("MODULE_PATH")){
|
||||
$user = SessionUtils::getSessionObject('user');
|
||||
|
||||
include (APP_BASE_PATH."classes/BaseService.php");
|
||||
include (APP_BASE_PATH."classes/CronUtils.php");
|
||||
include (APP_BASE_PATH."classes/FileService.php");
|
||||
include (APP_BASE_PATH."classes/SubActionManager.php");
|
||||
include (APP_BASE_PATH."classes/AbstractInitialize.php");
|
||||
@@ -49,6 +50,8 @@ include APP_BASE_PATH.'admin/users/api/UsersAdminManager.php';
|
||||
include APP_BASE_PATH.'admin/modules/api/ModulesAdminManager.php';
|
||||
include APP_BASE_PATH.'admin/permissions/api/PermissionsAdminManager.php';
|
||||
|
||||
include (APP_BASE_PATH."classes/ApproveActionManager.php");
|
||||
|
||||
$dbLocal = NewADOConnection(APP_CON_STR);
|
||||
|
||||
File::SetDatabaseAdapter($dbLocal);
|
||||
@@ -81,11 +84,11 @@ $noJSONRequests = SettingsManager::getInstance()->getSetting("System: Do not pas
|
||||
|
||||
$debugMode = SettingsManager::getInstance()->getSetting("System: Debug Mode");
|
||||
if($debugMode == "1"){
|
||||
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::DEBUG);}
|
||||
error_reporting(E_ALL);
|
||||
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::DEBUG);}
|
||||
}else{
|
||||
error_reporting(E_ERROR);
|
||||
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::INFO);}
|
||||
error_reporting(E_ERROR);
|
||||
}
|
||||
|
||||
LogManager::getInstance();
|
||||
@@ -155,4 +158,6 @@ if($emailEnabled == "1"){
|
||||
|
||||
BaseService::getInstance()->setEmailSender($emailSender);
|
||||
|
||||
include ('common.cron.tasks.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<div class="pull-left info">
|
||||
<p>#_firstName_# #_lastName_#</p>
|
||||
|
||||
<a href="#"><i class="fa fa-circle text-warning"></i> Updating </a>
|
||||
<a href="#"><i class="fa fa-circle text-warning"></i> Switched </a>
|
||||
</div>
|
||||
</div>
|
||||
5
src/templates/email/notificationEmail.html
Normal file
5
src/templates/email/notificationEmail.html
Normal file
@@ -0,0 +1,5 @@
|
||||
Hello #_user_#<br/><br/>
|
||||
#_message_#
|
||||
<br/>
|
||||
<br/>
|
||||
Visit IceHrm: <a href="#_url_#">#_url_#</a>
|
||||
@@ -1,5 +1,27 @@
|
||||
@import url(//fonts.googleapis.com/css?family=Ubuntu);
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("../font/roboto/Roboto-Thin-webfont.woff") format("woff");
|
||||
font-weight: 200; }
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("../font/roboto/Roboto-Light-webfont.woff") format("woff");
|
||||
font-weight: 300; }
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("../font/roboto/Roboto-Regular-webfont.woff") format("woff");
|
||||
font-weight: 400; }
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("../font/roboto/Roboto-Medium-webfont.woff") format("woff");
|
||||
font-weight: 500; }
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("../font/roboto/Roboto-Bold-webfont.woff") format("woff");
|
||||
font-weight: 700; }
|
||||
|
||||
/*
|
||||
@import url(//fonts.googleapis.com/css?family=Ubuntu);
|
||||
*/
|
||||
/*
|
||||
@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic);
|
||||
*/
|
||||
@@ -19,10 +41,10 @@
|
||||
html,
|
||||
body {
|
||||
overflow-x: hidden!important;
|
||||
font-family: 'Ubuntu', sans-serif;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
min-height: 100%;
|
||||
background: #f9f9f9;
|
||||
background: #fff;
|
||||
}
|
||||
a {
|
||||
color: #3c8dbc;
|
||||
@@ -406,7 +428,7 @@ body > .header .logo {
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
width: 220px;
|
||||
font-family: 'Ubuntu', cursive;
|
||||
font-family: 'Roboto', cursive;
|
||||
font-weight: 500;
|
||||
height: 50px;
|
||||
display: block;
|
||||
@@ -661,9 +683,11 @@ body > .header .logo .icon {
|
||||
margin: 0!important;
|
||||
top: 100%;
|
||||
border: 1px solid #dfdfdf;
|
||||
/*
|
||||
-webkit-border-radius: 4px !important;
|
||||
-moz-border-radius: 4px !important;
|
||||
border-radius: 4px !important;
|
||||
*/
|
||||
}
|
||||
.navbar-nav > .notifications-menu > .dropdown-menu > li.header,
|
||||
.navbar-nav > .messages-menu > .dropdown-menu > li.header,
|
||||
@@ -798,9 +822,9 @@ body > .header .logo .icon {
|
||||
margin: 0px;
|
||||
line-height: 20px;
|
||||
padding: 10px 5px 10px 5px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img {
|
||||
margin: auto 10px auto auto;
|
||||
@@ -1151,9 +1175,9 @@ body > .header .logo .icon {
|
||||
.small-box {
|
||||
position: relative;
|
||||
display: block;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.small-box > .inner {
|
||||
@@ -1260,9 +1284,9 @@ body > .header .logo .icon {
|
||||
background: #ffffff;
|
||||
border-top: 2px solid #c1c1c1;
|
||||
margin-bottom: 20px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -1291,12 +1315,12 @@ body > .header .logo .icon {
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-moz-border-radius-topleft: 0px;
|
||||
-moz-border-radius-topright: 0px;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom: 0px solid #f4f4f4;
|
||||
@@ -1337,12 +1361,12 @@ body > .header .logo .icon {
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-moz-border-radius-topleft: 0;
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-moz-border-radius-bottomright: 0px;
|
||||
-moz-border-radius-bottomleft: 0px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
.box .box-body > table,
|
||||
.box .box-body > .table {
|
||||
@@ -1406,16 +1430,16 @@ body > .header .logo .icon {
|
||||
border-top: 1px solid #f4f4f4;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
-webkit-border-top-right-radius: 0;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 0px;
|
||||
-webkit-border-bottom-left-radius: 0px;
|
||||
-moz-border-radius-topleft: 0;
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-moz-border-radius-bottomright: 0px;
|
||||
-moz-border-radius-bottomleft: 0px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
padding: 10px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
@@ -1473,9 +1497,9 @@ body > .header .logo .icon {
|
||||
box-shadow: none;
|
||||
}
|
||||
.box.box-solid.collapsed-box .box-header {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.box.box-solid[class*='bg'] > .box-header {
|
||||
color: #fff;
|
||||
@@ -1496,9 +1520,9 @@ body > .header .logo .icon {
|
||||
list-style: none;
|
||||
}
|
||||
.box .todo-list > li {
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
padding: 10px;
|
||||
background: #f3f4f5;
|
||||
margin-bottom: 2px;
|
||||
@@ -1601,9 +1625,9 @@ body > .header .logo .icon {
|
||||
font-weight: 600;
|
||||
}
|
||||
.box .chat .item > .attachment {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
background: #f0f0f0;
|
||||
margin-left: 65px;
|
||||
margin-right: 15px;
|
||||
@@ -2456,8 +2480,10 @@ Component: timeline
|
||||
}
|
||||
/* skin-blue content header */
|
||||
.skin-blue .right-side > .content-header {
|
||||
background: #fbfbfb;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
/*background: #fbfbfb;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);*/
|
||||
background: #367fa9;
|
||||
color: #FFF;
|
||||
}
|
||||
/* Skin-blue user panel */
|
||||
.skin-blue .user-panel > .image > img {
|
||||
@@ -2472,11 +2498,11 @@ Component: timeline
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
.skin-blue .sidebar > .sidebar-menu > li {
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
/*border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #dbdbdb;*/
|
||||
}
|
||||
.skin-blue .sidebar > .sidebar-menu > li:first-of-type {
|
||||
border-top: 1px solid #dbdbdb;
|
||||
/*border-top: 1px solid #dbdbdb;*/
|
||||
}
|
||||
.skin-blue .sidebar > .sidebar-menu > li:first-of-type > a {
|
||||
border-top: 1px solid #fff;
|
||||
@@ -2494,7 +2520,7 @@ Component: timeline
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.skin-blue .left-side {
|
||||
background: #f4f4f4;
|
||||
/*background: #f4f4f4;*/
|
||||
-webkit-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.07);
|
||||
|
||||
Reference in New Issue
Block a user