daybook changes , view changes : kdk
This commit is contained in:
parent
1ebb475ef4
commit
c3b2190855
@ -226,9 +226,14 @@ $scope.dayBookApprovalAccess = '';
|
||||
// alert(JSON.stringify($scope.myModel));
|
||||
}
|
||||
|
||||
|
||||
$scope.deleted1 = function (id) {
|
||||
|
||||
var id=id;
|
||||
var reason=prompt("Enter Reason!","");
|
||||
$scope.deleteFeePayableEntry(reason,id);
|
||||
}
|
||||
//delete the income entry From the fees payable
|
||||
$scope.deleteFeePayableEntry = function (id) {
|
||||
$scope.deleteFeePayableEntry = function (reason, id) {
|
||||
// alert(id);
|
||||
SweetAlert.swal({
|
||||
title: "Warning!",
|
||||
@ -248,6 +253,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
reason:reason,
|
||||
data: id,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
@ -264,9 +270,18 @@ $scope.dayBookApprovalAccess = '';
|
||||
});
|
||||
}
|
||||
|
||||
$scope.deleted = function (id) {
|
||||
|
||||
var id=id;
|
||||
var a=prompt("Enter Reason!","");
|
||||
$scope.deleEditEntry(a,id);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// delete the income/expense list row
|
||||
$scope.deleEditEntry = function (id) {
|
||||
$scope.deleEditEntry = function (a, id) {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Your will not be able to recover this record!",
|
||||
@ -277,9 +292,9 @@ $scope.dayBookApprovalAccess = '';
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function () {
|
||||
$scope.indexDelete2(id);
|
||||
$scope.indexDelete2(a, id);
|
||||
});
|
||||
$scope.indexDelete2 = function (id) {
|
||||
$scope.indexDelete2 = function (a, id) {
|
||||
var deleteDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'deleteDayBookDetails/',
|
||||
@ -287,6 +302,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
reason: a,
|
||||
data: id,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
|
||||
@ -229,11 +229,15 @@ $scope.dayBookApprovalAccess = '';
|
||||
}
|
||||
// alert(JSON.stringify($scope.myModel));
|
||||
}
|
||||
|
||||
$scope.deleted1 = function (id) {
|
||||
|
||||
var id=id;
|
||||
var reason=prompt("Enter Reason!","");
|
||||
$scope.deleteFeePayableEntry(reason,id);
|
||||
}
|
||||
|
||||
//delete the income entry From the fees payable
|
||||
$scope.deleteFeePayableEntry = function (id) {
|
||||
// alert(id);
|
||||
$scope.deleteFeePayableEntry = function (reason,id) {
|
||||
SweetAlert.swal({
|
||||
title: "Warning!",
|
||||
text: "Do you want to Delete this Entry ?",
|
||||
@ -252,6 +256,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
reason:reason,
|
||||
data: id,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
@ -268,9 +273,17 @@ $scope.dayBookApprovalAccess = '';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$scope.deleted = function (id) {
|
||||
|
||||
var id=id;
|
||||
var a=prompt("Enter Reason!","");
|
||||
$scope.deleEditEntry(a,id);
|
||||
|
||||
|
||||
|
||||
}
|
||||
// delete the income/expense list row
|
||||
$scope.deleEditEntry = function (id) {
|
||||
$scope.deleEditEntry = function (a, id) {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Your will not be able to recover this record!",
|
||||
@ -281,9 +294,9 @@ $scope.dayBookApprovalAccess = '';
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function () {
|
||||
$scope.indexDelete2(id);
|
||||
$scope.indexDelete2(a, id);
|
||||
});
|
||||
$scope.indexDelete2 = function (id) {
|
||||
$scope.indexDelete2 = function (a, id) {
|
||||
var deleteDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'deleteDayBookDetails/',
|
||||
@ -291,6 +304,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
reason: a,
|
||||
data: id,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
|
||||
@ -11,6 +11,21 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
|
||||
$scope.disableAddButton = false;
|
||||
$scope.disableEditButton = false;
|
||||
|
||||
//In controller
|
||||
$scope.exportAction = function(){
|
||||
alert();
|
||||
switch('excel'){
|
||||
case 'pdf': $scope.$broadcast('export-pdf', {});
|
||||
break;
|
||||
case 'excel': $scope.$broadcast('export-excel', {});
|
||||
break;
|
||||
case 'doc': $scope.$broadcast('export-doc', {});
|
||||
break;
|
||||
default: console.log('no event caught');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$scope.searchData = {
|
||||
"date": "",
|
||||
"dateTo": ""
|
||||
@ -324,7 +339,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
|
||||
$scope.deleted1 = function (id) {
|
||||
var id=id;
|
||||
var reason=prompt("Enter for the Delete Reason!","");
|
||||
var reason=prompt("Enter Reason!","");
|
||||
$scope.deleteFeePayableEntry(reason,id);
|
||||
}
|
||||
//delete the income entry From the fees payable
|
||||
@ -348,7 +363,8 @@ $scope.dayBookApprovalAccess = '';
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
reason:reason,data:id,
|
||||
reason:reason,
|
||||
data:id,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
};
|
||||
@ -369,7 +385,7 @@ $scope.dayBookApprovalAccess = '';
|
||||
$scope.deleted = function (id) {
|
||||
|
||||
var id=id;
|
||||
var a=prompt("Enter for the Delete Reason!","");
|
||||
var a=prompt("Enter Reason!","");
|
||||
$scope.deleEditEntry(a,id);
|
||||
|
||||
|
||||
@ -570,6 +586,28 @@ $scope.dayBookApprovalAccess = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function styleXl(){
|
||||
var mystyle = {
|
||||
sheetid: 'DAYBOOK DETAILS',
|
||||
headers: true,
|
||||
caption: {
|
||||
title:'DAYBOOK DETAILS'+ '('+ $scope.searchData.date + ' - ' + $scope.searchData.dateTo +')',
|
||||
width: '300px',
|
||||
style:'font-size:50px;color:blue;'
|
||||
},
|
||||
// style:'background:#00FF00',
|
||||
column: {
|
||||
style:'font-size:11px; color:blue;'
|
||||
}
|
||||
};
|
||||
return mystyle
|
||||
}
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT Date as Date, ListName as IncomeExpense, VoucherNumber as VoucherNumberBillNumber, PaidTo as PaidToReceivedFrom,FeePaymentDetails as Sem, CourseName as Course,UniversityName as University,TypeName as Type, ReceiptNo as Receipt_No, ReceiptNoComments as Comments, ModeOfPayment as Mode_of_Payment,Amount as Amount,Balance as Balance, Reason, Activity INTO XLS("daybook_details.xls",?) FROM ?',[styleXl(),$scope.data]);
|
||||
};
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
44
Apollo/assets/js/directives/table-export.js
Normal file
44
Apollo/assets/js/directives/table-export.js
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
// 'use strict';
|
||||
// /**
|
||||
// * Prevent default action on empty links.
|
||||
// */
|
||||
// app.directive('a', function () {
|
||||
// return {
|
||||
// restrict: 'E',
|
||||
// link: function (scope, elem, attrs) {
|
||||
// if (attrs.ngClick || attrs.href === '' || attrs.href === '#') {
|
||||
// elem.on('click', function (e) {
|
||||
// e.preventDefault();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// });
|
||||
|
||||
|
||||
|
||||
(function(){
|
||||
// alert();
|
||||
//export html table to pdf, excel and doc format directive
|
||||
var exportTable = function(){;
|
||||
var link = function($scope, elm, attr){
|
||||
$scope.$on('export-pdf', function(e, d){
|
||||
elm.tableExport({type:'pdf', escape:false});
|
||||
});
|
||||
$scope.$on('export-excel', function(e, d){
|
||||
alert();
|
||||
elm.tableExport({type:'excel', escape:false});
|
||||
});
|
||||
$scope.$on('export-doc', function(e, d){
|
||||
elm.tableExport({type: 'doc', escape:false});
|
||||
});
|
||||
}
|
||||
return {
|
||||
restrict: 'C',
|
||||
link: link
|
||||
}
|
||||
}
|
||||
app
|
||||
.directive('exportTable', exportTable);
|
||||
})();
|
||||
48
Apollo/assets/js/tableExport/README.md
Normal file
48
Apollo/assets/js/tableExport/README.md
Normal file
@ -0,0 +1,48 @@
|
||||
tableExport.jquery.plugin
|
||||
=========================
|
||||
|
||||
<h3>Export HTML Table to</h3>
|
||||
<ul>
|
||||
<li> JSON
|
||||
<li> XML
|
||||
<li> PNG
|
||||
<li> CSV
|
||||
<li> TXT
|
||||
<li> SQL
|
||||
<li> MS-Word
|
||||
<li> Ms-Excel
|
||||
<li> Ms-Powerpoint
|
||||
<li> PDF
|
||||
</ul>
|
||||
|
||||
Installation
|
||||
============
|
||||
jquery Plugin<BR>
|
||||
<script type="text/javascript" src="tableExport.js"><BR>
|
||||
<script type="text/javascript" src="jquery.base64.js"><BR>
|
||||
<BR>
|
||||
PNG Export
|
||||
==========
|
||||
<script type="text/javascript" src="html2canvas.js">
|
||||
|
||||
PDF Export
|
||||
==========
|
||||
<script type="text/javascript" src="jspdf/libs/sprintf.js"><BR>
|
||||
<script type="text/javascript" src="jspdf/jspdf.js"><BR>
|
||||
<script type="text/javascript" src="jspdf/libs/base64.js"><BR>
|
||||
|
||||
Usage
|
||||
======
|
||||
onClick ="$('#tableID').tableExport({type:'pdf',escape:'false'});"<BR>
|
||||
|
||||
Options
|
||||
=======
|
||||
separator: ','<BR>
|
||||
ignoreColumn: [2,3],<BR>
|
||||
tableName:'yourTableName'<BR>
|
||||
type:'csv'<BR>
|
||||
pdfFontSize:14<BR>
|
||||
pdfLeftMargin:20<BR>
|
||||
escape:'true'<BR>
|
||||
htmlContent:'false'<BR>
|
||||
consoleLog:'false' <BR>
|
||||
3010
Apollo/assets/js/tableExport/html2canvas.js
Normal file
3010
Apollo/assets/js/tableExport/html2canvas.js
Normal file
File diff suppressed because it is too large
Load Diff
190
Apollo/assets/js/tableExport/jquery.base64.js
Normal file
190
Apollo/assets/js/tableExport/jquery.base64.js
Normal file
@ -0,0 +1,190 @@
|
||||
/*jslint adsafe: false, bitwise: true, browser: true, cap: false, css: false,
|
||||
debug: false, devel: true, eqeqeq: true, es5: false, evil: false,
|
||||
forin: false, fragment: false, immed: true, laxbreak: false, newcap: true,
|
||||
nomen: false, on: false, onevar: true, passfail: false, plusplus: true,
|
||||
regexp: false, rhino: true, safe: false, strict: false, sub: false,
|
||||
undef: true, white: false, widget: false, windows: false */
|
||||
/*global jQuery: false, window: false */
|
||||
//"use strict";
|
||||
|
||||
/*
|
||||
* Original code (c) 2010 Nick Galbreath
|
||||
* http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
|
||||
*
|
||||
* jQuery port (c) 2010 Carlo Zottmann
|
||||
* http://github.com/carlo/jquery-base64
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* base64 encode/decode compatible with window.btoa/atob
|
||||
*
|
||||
* window.atob/btoa is a Firefox extension to convert binary data (the "b")
|
||||
* to base64 (ascii, the "a").
|
||||
*
|
||||
* It is also found in Safari and Chrome. It is not available in IE.
|
||||
*
|
||||
* if (!window.btoa) window.btoa = $.base64.encode
|
||||
* if (!window.atob) window.atob = $.base64.decode
|
||||
*
|
||||
* The original spec's for atob/btoa are a bit lacking
|
||||
* https://developer.mozilla.org/en/DOM/window.atob
|
||||
* https://developer.mozilla.org/en/DOM/window.btoa
|
||||
*
|
||||
* window.btoa and $.base64.encode takes a string where charCodeAt is [0,255]
|
||||
* If any character is not [0,255], then an exception is thrown.
|
||||
*
|
||||
* window.atob and $.base64.decode take a base64-encoded string
|
||||
* If the input length is not a multiple of 4, or contains invalid characters
|
||||
* then an exception is thrown.
|
||||
*/
|
||||
|
||||
jQuery.base64 = ( function( $ ) {
|
||||
|
||||
var _PADCHAR = "=",
|
||||
_ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
||||
_VERSION = "1.0";
|
||||
|
||||
|
||||
function _getbyte64( s, i ) {
|
||||
// This is oddly fast, except on Chrome/V8.
|
||||
// Minimal or no improvement in performance by using a
|
||||
// object with properties mapping chars to value (eg. 'A': 0)
|
||||
|
||||
var idx = _ALPHA.indexOf( s.charAt( i ) );
|
||||
|
||||
if ( idx === -1 ) {
|
||||
throw "Cannot decode base64";
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
||||
function _decode( s ) {
|
||||
var pads = 0,
|
||||
i,
|
||||
b10,
|
||||
imax = s.length,
|
||||
x = [];
|
||||
|
||||
s = String( s );
|
||||
|
||||
if ( imax === 0 ) {
|
||||
return s;
|
||||
}
|
||||
|
||||
if ( imax % 4 !== 0 ) {
|
||||
throw "Cannot decode base64";
|
||||
}
|
||||
|
||||
if ( s.charAt( imax - 1 ) === _PADCHAR ) {
|
||||
pads = 1;
|
||||
|
||||
if ( s.charAt( imax - 2 ) === _PADCHAR ) {
|
||||
pads = 2;
|
||||
}
|
||||
|
||||
// either way, we want to ignore this last block
|
||||
imax -= 4;
|
||||
}
|
||||
|
||||
for ( i = 0; i < imax; i += 4 ) {
|
||||
b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 );
|
||||
x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff, b10 & 0xff ) );
|
||||
}
|
||||
|
||||
switch ( pads ) {
|
||||
case 1:
|
||||
b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 );
|
||||
x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff ) );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 );
|
||||
x.push( String.fromCharCode( b10 >> 16 ) );
|
||||
break;
|
||||
}
|
||||
|
||||
return x.join( "" );
|
||||
}
|
||||
|
||||
|
||||
function _getbyte( s, i ) {
|
||||
var x = s.charCodeAt( i );
|
||||
|
||||
if ( x > 255 ) {
|
||||
throw "INVALID_CHARACTER_ERR: DOM Exception 5";
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
function _encode( s ) {
|
||||
if ( arguments.length !== 1 ) {
|
||||
throw "SyntaxError: exactly one argument required";
|
||||
}
|
||||
|
||||
s = String( s );
|
||||
|
||||
var i,
|
||||
b10,
|
||||
x = [],
|
||||
imax = s.length - s.length % 3;
|
||||
|
||||
if ( s.length === 0 ) {
|
||||
return s;
|
||||
}
|
||||
|
||||
for ( i = 0; i < imax; i += 3 ) {
|
||||
b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ) | _getbyte( s, i + 2 );
|
||||
x.push( _ALPHA.charAt( b10 >> 18 ) );
|
||||
x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) );
|
||||
x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) );
|
||||
x.push( _ALPHA.charAt( b10 & 0x3f ) );
|
||||
}
|
||||
|
||||
switch ( s.length - imax ) {
|
||||
case 1:
|
||||
b10 = _getbyte( s, i ) << 16;
|
||||
x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 );
|
||||
x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR );
|
||||
break;
|
||||
}
|
||||
|
||||
return x.join( "" );
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
decode: _decode,
|
||||
encode: _encode,
|
||||
VERSION: _VERSION
|
||||
};
|
||||
|
||||
}( jQuery ) );
|
||||
|
||||
303
Apollo/assets/js/tableExport/jspdf/jspdf.js
Normal file
303
Apollo/assets/js/tableExport/jspdf/jspdf.js
Normal file
@ -0,0 +1,303 @@
|
||||
/**
|
||||
* jsPDF
|
||||
* (c) 2009 James Hall
|
||||
*
|
||||
* Some parts based on FPDF.
|
||||
*/
|
||||
|
||||
var jsPDF = function(){
|
||||
|
||||
// Private properties
|
||||
var version = '20090504';
|
||||
var buffer = '';
|
||||
|
||||
var pdfVersion = '1.3'; // PDF Version
|
||||
var defaultPageFormat = 'a4';
|
||||
var pageFormats = { // Size in mm of various paper formats
|
||||
'a3': [841.89, 1190.55],
|
||||
'a4': [595.28, 841.89],
|
||||
'a5': [420.94, 595.28],
|
||||
'letter': [612, 792],
|
||||
'legal': [612, 1008]
|
||||
};
|
||||
var textColor = '0 g';
|
||||
var page = 0;
|
||||
var objectNumber = 2; // 'n' Current object number
|
||||
var state = 0; // Current document state
|
||||
var pages = new Array();
|
||||
var offsets = new Array(); // List of offsets
|
||||
var lineWidth = 0.200025; // 2mm
|
||||
var pageHeight;
|
||||
var k; // Scale factor
|
||||
var unit = 'mm'; // Default to mm for units
|
||||
var fontNumber; // TODO: This is temp, replace with real font handling
|
||||
var documentProperties = {};
|
||||
var fontSize = 16; // Default font size
|
||||
var pageFontSize = 16;
|
||||
|
||||
// Initilisation
|
||||
if (unit == 'pt') {
|
||||
k = 1;
|
||||
} else if(unit == 'mm') {
|
||||
k = 72/25.4;
|
||||
} else if(unit == 'cm') {
|
||||
k = 72/2.54;
|
||||
} else if(unit == 'in') {
|
||||
k = 72;
|
||||
}
|
||||
|
||||
// Private functions
|
||||
var newObject = function() {
|
||||
//Begin a new object
|
||||
objectNumber ++;
|
||||
offsets[objectNumber] = buffer.length;
|
||||
out(objectNumber + ' 0 obj');
|
||||
}
|
||||
|
||||
|
||||
var putHeader = function() {
|
||||
out('%PDF-' + pdfVersion);
|
||||
}
|
||||
|
||||
var putPages = function() {
|
||||
|
||||
// TODO: Fix, hardcoded to a4 portrait
|
||||
var wPt = pageWidth * k;
|
||||
var hPt = pageHeight * k;
|
||||
|
||||
for(n=1; n <= page; n++) {
|
||||
newObject();
|
||||
out('<</Type /Page');
|
||||
out('/Parent 1 0 R');
|
||||
out('/Resources 2 0 R');
|
||||
out('/Contents ' + (objectNumber + 1) + ' 0 R>>');
|
||||
out('endobj');
|
||||
|
||||
//Page content
|
||||
p = pages[n];
|
||||
newObject();
|
||||
out('<</Length ' + p.length + '>>');
|
||||
putStream(p);
|
||||
out('endobj');
|
||||
}
|
||||
offsets[1] = buffer.length;
|
||||
out('1 0 obj');
|
||||
out('<</Type /Pages');
|
||||
var kids='/Kids [';
|
||||
for (i = 0; i < page; i++) {
|
||||
kids += (3 + 2 * i) + ' 0 R ';
|
||||
}
|
||||
out(kids + ']');
|
||||
out('/Count ' + page);
|
||||
out(sprintf('/MediaBox [0 0 %.2f %.2f]', wPt, hPt));
|
||||
out('>>');
|
||||
out('endobj');
|
||||
}
|
||||
|
||||
var putStream = function(str) {
|
||||
out('stream');
|
||||
out(str);
|
||||
out('endstream');
|
||||
}
|
||||
|
||||
var putResources = function() {
|
||||
putFonts();
|
||||
putImages();
|
||||
|
||||
//Resource dictionary
|
||||
offsets[2] = buffer.length;
|
||||
out('2 0 obj');
|
||||
out('<<');
|
||||
putResourceDictionary();
|
||||
out('>>');
|
||||
out('endobj');
|
||||
}
|
||||
|
||||
var putFonts = function() {
|
||||
// TODO: Only supports core font hardcoded to Helvetica
|
||||
newObject();
|
||||
fontNumber = objectNumber;
|
||||
name = 'Helvetica';
|
||||
out('<</Type /Font');
|
||||
out('/BaseFont /' + name);
|
||||
out('/Subtype /Type1');
|
||||
out('/Encoding /WinAnsiEncoding');
|
||||
out('>>');
|
||||
out('endobj');
|
||||
}
|
||||
|
||||
var putImages = function() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
var putResourceDictionary = function() {
|
||||
out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
|
||||
out('/Font <<');
|
||||
// Do this for each font, the '1' bit is the index of the font
|
||||
// fontNumber is currently the object number related to 'putFonts'
|
||||
out('/F1 ' + fontNumber + ' 0 R');
|
||||
out('>>');
|
||||
out('/XObject <<');
|
||||
putXobjectDict();
|
||||
out('>>');
|
||||
}
|
||||
|
||||
var putXobjectDict = function() {
|
||||
// TODO
|
||||
// Loop through images
|
||||
}
|
||||
|
||||
|
||||
var putInfo = function() {
|
||||
out('/Producer (jsPDF ' + version + ')');
|
||||
if(documentProperties.title != undefined) {
|
||||
out('/Title (' + pdfEscape(documentProperties.title) + ')');
|
||||
}
|
||||
if(documentProperties.subject != undefined) {
|
||||
out('/Subject (' + pdfEscape(documentProperties.subject) + ')');
|
||||
}
|
||||
if(documentProperties.author != undefined) {
|
||||
out('/Author (' + pdfEscape(documentProperties.author) + ')');
|
||||
}
|
||||
if(documentProperties.keywords != undefined) {
|
||||
out('/Keywords (' + pdfEscape(documentProperties.keywords) + ')');
|
||||
}
|
||||
if(documentProperties.creator != undefined) {
|
||||
out('/Creator (' + pdfEscape(documentProperties.creator) + ')');
|
||||
}
|
||||
var created = new Date();
|
||||
var year = created.getFullYear();
|
||||
var month = (created.getMonth() + 1);
|
||||
var day = created.getDate();
|
||||
var hour = created.getHours();
|
||||
var minute = created.getMinutes();
|
||||
var second = created.getSeconds();
|
||||
out('/CreationDate (D:' + sprintf('%02d%02d%02d%02d%02d%02d', year, month, day, hour, minute, second) + ')');
|
||||
}
|
||||
|
||||
var putCatalog = function () {
|
||||
out('/Type /Catalog');
|
||||
out('/Pages 1 0 R');
|
||||
// TODO: Add zoom and layout modes
|
||||
out('/OpenAction [3 0 R /FitH null]');
|
||||
out('/PageLayout /OneColumn');
|
||||
}
|
||||
|
||||
function putTrailer() {
|
||||
out('/Size ' + (objectNumber + 1));
|
||||
out('/Root ' + objectNumber + ' 0 R');
|
||||
out('/Info ' + (objectNumber - 1) + ' 0 R');
|
||||
}
|
||||
|
||||
var endDocument = function() {
|
||||
state = 1;
|
||||
putHeader();
|
||||
putPages();
|
||||
|
||||
putResources();
|
||||
//Info
|
||||
newObject();
|
||||
out('<<');
|
||||
putInfo();
|
||||
out('>>');
|
||||
out('endobj');
|
||||
|
||||
//Catalog
|
||||
newObject();
|
||||
out('<<');
|
||||
putCatalog();
|
||||
out('>>');
|
||||
out('endobj');
|
||||
|
||||
//Cross-ref
|
||||
var o = buffer.length;
|
||||
out('xref');
|
||||
out('0 ' + (objectNumber + 1));
|
||||
out('0000000000 65535 f ');
|
||||
for (var i=1; i <= objectNumber; i++) {
|
||||
out(sprintf('%010d 00000 n ', offsets[i]));
|
||||
}
|
||||
//Trailer
|
||||
out('trailer');
|
||||
out('<<');
|
||||
putTrailer();
|
||||
out('>>');
|
||||
out('startxref');
|
||||
out(o);
|
||||
out('%%EOF');
|
||||
state = 3;
|
||||
}
|
||||
|
||||
var beginPage = function() {
|
||||
page ++;
|
||||
// Do dimension stuff
|
||||
state = 2;
|
||||
pages[page] = '';
|
||||
|
||||
// TODO: Hardcoded at A4 and portrait
|
||||
pageHeight = pageFormats['a4'][1] / k;
|
||||
pageWidth = pageFormats['a4'][0] / k;
|
||||
}
|
||||
|
||||
var out = function(string) {
|
||||
if(state == 2) {
|
||||
pages[page] += string + '\n';
|
||||
} else {
|
||||
buffer += string + '\n';
|
||||
}
|
||||
}
|
||||
|
||||
var _addPage = function() {
|
||||
beginPage();
|
||||
// Set line width
|
||||
out(sprintf('%.2f w', (lineWidth * k)));
|
||||
|
||||
// Set font - TODO
|
||||
// 16 is the font size
|
||||
pageFontSize = fontSize;
|
||||
out('BT /F1 ' + parseInt(fontSize) + '.00 Tf ET');
|
||||
}
|
||||
|
||||
// Add the first page automatically
|
||||
_addPage();
|
||||
|
||||
// Escape text
|
||||
var pdfEscape = function(text) {
|
||||
return text.replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)');
|
||||
}
|
||||
|
||||
return {
|
||||
addPage: function() {
|
||||
_addPage();
|
||||
},
|
||||
text: function(x, y, text) {
|
||||
// need page height
|
||||
if(pageFontSize != fontSize) {
|
||||
out('BT /F1 ' + parseInt(fontSize) + '.00 Tf ET');
|
||||
pageFontSize = fontSize;
|
||||
}
|
||||
var str = sprintf('BT %.2f %.2f Td (%s) Tj ET', x * k, (pageHeight - y) * k, pdfEscape(text));
|
||||
out(str);
|
||||
},
|
||||
setProperties: function(properties) {
|
||||
documentProperties = properties;
|
||||
},
|
||||
addImage: function(imageData, format, x, y, w, h) {
|
||||
|
||||
},
|
||||
output: function(type, options) {
|
||||
endDocument();
|
||||
if(type == undefined) {
|
||||
return buffer;
|
||||
}
|
||||
if(type == 'datauri') {
|
||||
document.location.href = 'data:application/pdf;base64,' + Base64.encode(buffer);
|
||||
}
|
||||
// @TODO: Add different output options
|
||||
},
|
||||
setFontSize: function(size) {
|
||||
fontSize = size;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
143
Apollo/assets/js/tableExport/jspdf/libs/base64.js
Normal file
143
Apollo/assets/js/tableExport/jspdf/libs/base64.js
Normal file
@ -0,0 +1,143 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Base64 encode / decode
|
||||
* http://www.webtoolkit.info/
|
||||
*
|
||||
**/
|
||||
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
// public method for encoding
|
||||
encode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
// public method for decoding
|
||||
decode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode : function (string) {
|
||||
string = string.replace(/\r\n/g,"\n");
|
||||
var utftext = "";
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
}
|
||||
else if((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return utftext;
|
||||
},
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode : function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while ( i < utftext.length ) {
|
||||
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
}
|
||||
else if((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
}
|
||||
else {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
c3 = utftext.charCodeAt(i+2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
152
Apollo/assets/js/tableExport/jspdf/libs/sprintf.js
Normal file
152
Apollo/assets/js/tableExport/jspdf/libs/sprintf.js
Normal file
@ -0,0 +1,152 @@
|
||||
|
||||
|
||||
function sprintf( ) {
|
||||
// Return a formatted string
|
||||
//
|
||||
// version: 903.3016
|
||||
// discuss at: http://phpjs.org/functions/sprintf
|
||||
// + original by: Ash Searle (http://hexmen.com/blog/)
|
||||
// + namespaced by: Michael White (http://getsprink.com)
|
||||
// + tweaked by: Jack
|
||||
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
|
||||
// + input by: Paulo Ricardo F. Santos
|
||||
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
|
||||
// + input by: Brett Zamir (http://brettz9.blogspot.com)
|
||||
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
|
||||
// * example 1: sprintf("%01.2f", 123.1);
|
||||
// * returns 1: 123.10
|
||||
// * example 2: sprintf("[%10s]", 'monkey');
|
||||
// * returns 2: '[ monkey]'
|
||||
// * example 3: sprintf("[%'#10s]", 'monkey');
|
||||
// * returns 3: '[####monkey]'
|
||||
var regex = /%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;
|
||||
var a = arguments, i = 0, format = a[i++];
|
||||
|
||||
// pad()
|
||||
var pad = function(str, len, chr, leftJustify) {
|
||||
if (!chr) chr = ' ';
|
||||
var padding = (str.length >= len) ? '' : Array(1 + len - str.length >>> 0).join(chr);
|
||||
return leftJustify ? str + padding : padding + str;
|
||||
};
|
||||
|
||||
// justify()
|
||||
var justify = function(value, prefix, leftJustify, minWidth, zeroPad, customPadChar) {
|
||||
var diff = minWidth - value.length;
|
||||
if (diff > 0) {
|
||||
if (leftJustify || !zeroPad) {
|
||||
value = pad(value, minWidth, customPadChar, leftJustify);
|
||||
} else {
|
||||
value = value.slice(0, prefix.length) + pad('', diff, '0', true) + value.slice(prefix.length);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
// formatBaseX()
|
||||
var formatBaseX = function(value, base, prefix, leftJustify, minWidth, precision, zeroPad) {
|
||||
// Note: casts negative numbers to positive ones
|
||||
var number = value >>> 0;
|
||||
prefix = prefix && number && {'2': '0b', '8': '0', '16': '0x'}[base] || '';
|
||||
value = prefix + pad(number.toString(base), precision || 0, '0', false);
|
||||
return justify(value, prefix, leftJustify, minWidth, zeroPad);
|
||||
};
|
||||
|
||||
// formatString()
|
||||
var formatString = function(value, leftJustify, minWidth, precision, zeroPad, customPadChar) {
|
||||
if (precision != null) {
|
||||
value = value.slice(0, precision);
|
||||
}
|
||||
return justify(value, '', leftJustify, minWidth, zeroPad, customPadChar);
|
||||
};
|
||||
|
||||
// doFormat()
|
||||
var doFormat = function(substring, valueIndex, flags, minWidth, _, precision, type) {
|
||||
var number;
|
||||
var prefix;
|
||||
var method;
|
||||
var textTransform;
|
||||
var value;
|
||||
|
||||
if (substring == '%%') return '%';
|
||||
|
||||
// parse flags
|
||||
var leftJustify = false, positivePrefix = '', zeroPad = false, prefixBaseX = false, customPadChar = ' ';
|
||||
var flagsl = flags.length;
|
||||
for (var j = 0; flags && j < flagsl; j++) switch (flags.charAt(j)) {
|
||||
case ' ': positivePrefix = ' '; break;
|
||||
case '+': positivePrefix = '+'; break;
|
||||
case '-': leftJustify = true; break;
|
||||
case "'": customPadChar = flags.charAt(j+1); break;
|
||||
case '0': zeroPad = true; break;
|
||||
case '#': prefixBaseX = true; break;
|
||||
}
|
||||
|
||||
// parameters may be null, undefined, empty-string or real valued
|
||||
// we want to ignore null, undefined and empty-string values
|
||||
if (!minWidth) {
|
||||
minWidth = 0;
|
||||
} else if (minWidth == '*') {
|
||||
minWidth = +a[i++];
|
||||
} else if (minWidth.charAt(0) == '*') {
|
||||
minWidth = +a[minWidth.slice(1, -1)];
|
||||
} else {
|
||||
minWidth = +minWidth;
|
||||
}
|
||||
|
||||
// Note: undocumented perl feature:
|
||||
if (minWidth < 0) {
|
||||
minWidth = -minWidth;
|
||||
leftJustify = true;
|
||||
}
|
||||
|
||||
if (!isFinite(minWidth)) {
|
||||
throw new Error('sprintf: (minimum-)width must be finite');
|
||||
}
|
||||
|
||||
if (!precision) {
|
||||
precision = 'fFeE'.indexOf(type) > -1 ? 6 : (type == 'd') ? 0 : void(0);
|
||||
} else if (precision == '*') {
|
||||
precision = +a[i++];
|
||||
} else if (precision.charAt(0) == '*') {
|
||||
precision = +a[precision.slice(1, -1)];
|
||||
} else {
|
||||
precision = +precision;
|
||||
}
|
||||
|
||||
// grab value using valueIndex if required?
|
||||
value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++];
|
||||
|
||||
switch (type) {
|
||||
case 's': return formatString(String(value), leftJustify, minWidth, precision, zeroPad, customPadChar);
|
||||
case 'c': return formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad);
|
||||
case 'b': return formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
|
||||
case 'o': return formatBaseX(value, 8, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
|
||||
case 'x': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
|
||||
case 'X': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad).toUpperCase();
|
||||
case 'u': return formatBaseX(value, 10, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
|
||||
case 'i':
|
||||
case 'd': {
|
||||
number = parseInt(+value);
|
||||
prefix = number < 0 ? '-' : positivePrefix;
|
||||
value = prefix + pad(String(Math.abs(number)), precision, '0', false);
|
||||
return justify(value, prefix, leftJustify, minWidth, zeroPad);
|
||||
}
|
||||
case 'e':
|
||||
case 'E':
|
||||
case 'f':
|
||||
case 'F':
|
||||
case 'g':
|
||||
case 'G': {
|
||||
number = +value;
|
||||
prefix = number < 0 ? '-' : positivePrefix;
|
||||
method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())];
|
||||
textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2];
|
||||
value = prefix + Math.abs(number)[method](precision);
|
||||
return justify(value, prefix, leftJustify, minWidth, zeroPad)[textTransform]();
|
||||
}
|
||||
default: return substring;
|
||||
}
|
||||
};
|
||||
|
||||
return format.replace(regex, doFormat);
|
||||
}
|
||||
1
Apollo/assets/js/tableExport/tableExport.jquery.json
Normal file
1
Apollo/assets/js/tableExport/tableExport.jquery.json
Normal file
@ -0,0 +1 @@
|
||||
|
||||
359
Apollo/assets/js/tableExport/tableExport.js
Normal file
359
Apollo/assets/js/tableExport/tableExport.js
Normal file
@ -0,0 +1,359 @@
|
||||
/*The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 https://github.com/kayalshri/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
(function($){
|
||||
$.fn.extend({
|
||||
tableExport: function(options) {
|
||||
var defaults = {
|
||||
separator: ',',
|
||||
ignoreColumn: [],
|
||||
tableName:'yourTableName',
|
||||
type:'csv',
|
||||
pdfFontSize:14,
|
||||
pdfLeftMargin:20,
|
||||
escape:'true',
|
||||
htmlContent:'false',
|
||||
consoleLog:'false'
|
||||
};
|
||||
|
||||
var options = $.extend(defaults, options);
|
||||
var el = this;
|
||||
|
||||
if(defaults.type == 'csv' || defaults.type == 'txt'){
|
||||
|
||||
// Header
|
||||
var tdData ="";
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
tdData += "\n";
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
tdData += '"' + parseString($(this)) + '"' + defaults.separator;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
tdData = $.trim(tdData);
|
||||
tdData = $.trim(tdData).substring(0, tdData.length -1);
|
||||
});
|
||||
|
||||
// Row vs Column
|
||||
$(el).find('tbody').find('tr').each(function() {
|
||||
tdData += "\n";
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
tdData += '"'+ parseString($(this)) + '"'+ defaults.separator;
|
||||
}
|
||||
}
|
||||
});
|
||||
//tdData = $.trim(tdData);
|
||||
tdData = $.trim(tdData).substring(0, tdData.length -1);
|
||||
});
|
||||
|
||||
//output
|
||||
if(defaults.consoleLog == 'true'){
|
||||
console.log(tdData);
|
||||
}
|
||||
var base64data = "base64," + $.base64.encode(tdData);
|
||||
window.open('data:application/'+defaults.type+';filename=exportData;' + base64data);
|
||||
}else if(defaults.type == 'sql'){
|
||||
|
||||
// Header
|
||||
var tdData ="INSERT INTO `"+defaults.tableName+"` (";
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
tdData += '`' + parseString($(this)) + '`,' ;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
tdData = $.trim(tdData);
|
||||
tdData = $.trim(tdData).substring(0, tdData.length -1);
|
||||
});
|
||||
tdData += ") VALUES ";
|
||||
// Row vs Column
|
||||
$(el).find('tbody').find('tr').each(function() {
|
||||
tdData += "(";
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
tdData += '"'+ parseString($(this)) + '",';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tdData = $.trim(tdData).substring(0, tdData.length -1);
|
||||
tdData += "),";
|
||||
});
|
||||
tdData = $.trim(tdData).substring(0, tdData.length -1);
|
||||
tdData += ";";
|
||||
|
||||
//output
|
||||
//console.log(tdData);
|
||||
|
||||
if(defaults.consoleLog == 'true'){
|
||||
console.log(tdData);
|
||||
}
|
||||
|
||||
var base64data = "base64," + $.base64.encode(tdData);
|
||||
window.open('data:application/sql;filename=exportData;' + base64data);
|
||||
|
||||
|
||||
}else if(defaults.type == 'json'){
|
||||
|
||||
var jsonHeaderArray = [];
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
var tdData ="";
|
||||
var jsonArrayTd = [];
|
||||
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
jsonArrayTd.push(parseString($(this)));
|
||||
}
|
||||
}
|
||||
});
|
||||
jsonHeaderArray.push(jsonArrayTd);
|
||||
|
||||
});
|
||||
|
||||
var jsonArray = [];
|
||||
$(el).find('tbody').find('tr').each(function() {
|
||||
var tdData ="";
|
||||
var jsonArrayTd = [];
|
||||
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
jsonArrayTd.push(parseString($(this)));
|
||||
}
|
||||
}
|
||||
});
|
||||
jsonArray.push(jsonArrayTd);
|
||||
|
||||
});
|
||||
|
||||
var jsonExportArray =[];
|
||||
jsonExportArray.push({header:jsonHeaderArray,data:jsonArray});
|
||||
|
||||
//Return as JSON
|
||||
//console.log(JSON.stringify(jsonExportArray));
|
||||
|
||||
//Return as Array
|
||||
//console.log(jsonExportArray);
|
||||
if(defaults.consoleLog == 'true'){
|
||||
console.log(JSON.stringify(jsonExportArray));
|
||||
}
|
||||
var base64data = "base64," + $.base64.encode(JSON.stringify(jsonExportArray));
|
||||
window.open('data:application/json;filename=exportData;' + base64data);
|
||||
}else if(defaults.type == 'xml'){
|
||||
|
||||
var xml = '<?xml version="1.0" encoding="utf-8"?>';
|
||||
xml += '<tabledata><fields>';
|
||||
|
||||
// Header
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
xml += "<field>" + parseString($(this)) + "</field>";
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
xml += '</fields><data>';
|
||||
|
||||
// Row Vs Column
|
||||
var rowCount=1;
|
||||
$(el).find('tbody').find('tr').each(function() {
|
||||
xml += '<row id="'+rowCount+'">';
|
||||
var colCount=0;
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
xml += "<column-"+colCount+">"+parseString($(this))+"</column-"+colCount+">";
|
||||
}
|
||||
}
|
||||
colCount++;
|
||||
});
|
||||
rowCount++;
|
||||
xml += '</row>';
|
||||
});
|
||||
xml += '</data></tabledata>'
|
||||
|
||||
if(defaults.consoleLog == 'true'){
|
||||
console.log(xml);
|
||||
}
|
||||
|
||||
var base64data = "base64," + $.base64.encode(xml);
|
||||
window.open('data:application/xml;filename=exportData;' + base64data);
|
||||
|
||||
}else if(defaults.type == 'excel' || defaults.type == 'doc'|| defaults.type == 'powerpoint' ){
|
||||
//console.log($(this).html());
|
||||
var excel="<table>";
|
||||
// Header
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
excel += "<tr>";
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
excel += "<td>" + parseString($(this))+ "</td>";
|
||||
}
|
||||
}
|
||||
});
|
||||
excel += '</tr>';
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Row Vs Column
|
||||
var rowCount=1;
|
||||
$(el).find('tbody').find('tr').each(function() {
|
||||
excel += "<tr>";
|
||||
var colCount=0;
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
excel += "<td>"+parseString($(this))+"</td>";
|
||||
}
|
||||
}
|
||||
colCount++;
|
||||
});
|
||||
rowCount++;
|
||||
excel += '</tr>';
|
||||
});
|
||||
excel += '</table>'
|
||||
|
||||
if(defaults.consoleLog == 'true'){
|
||||
console.log(excel);
|
||||
}
|
||||
|
||||
var excelFile = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:"+defaults.type+"' xmlns='http://www.w3.org/TR/REC-html40'>";
|
||||
excelFile += "<head>";
|
||||
excelFile += "<!--[if gte mso 9]>";
|
||||
excelFile += "<xml>";
|
||||
excelFile += "<x:ExcelWorkbook>";
|
||||
excelFile += "<x:ExcelWorksheets>";
|
||||
excelFile += "<x:ExcelWorksheet>";
|
||||
excelFile += "<x:Name>";
|
||||
excelFile += "{worksheet}";
|
||||
excelFile += "</x:Name>";
|
||||
excelFile += "<x:WorksheetOptions>";
|
||||
excelFile += "<x:DisplayGridlines/>";
|
||||
excelFile += "</x:WorksheetOptions>";
|
||||
excelFile += "</x:ExcelWorksheet>";
|
||||
excelFile += "</x:ExcelWorksheets>";
|
||||
excelFile += "</x:ExcelWorkbook>";
|
||||
excelFile += "</xml>";
|
||||
excelFile += "<![endif]-->";
|
||||
excelFile += "</head>";
|
||||
excelFile += "<body>";
|
||||
excelFile += excel;
|
||||
excelFile += "</body>";
|
||||
excelFile += "</html>";
|
||||
|
||||
var base64data = "base64," + $.base64.encode(excelFile);
|
||||
window.open('data:application/vnd.ms-'+defaults.type+';filename=exportData.doc;' + base64data);
|
||||
|
||||
}else if(defaults.type == 'png'){
|
||||
html2canvas($(el), {
|
||||
onrendered: function(canvas) {
|
||||
var img = canvas.toDataURL("image/png");
|
||||
window.open(img);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}else if(defaults.type == 'pdf'){
|
||||
|
||||
var doc = new jsPDF('p','pt', 'a4', true);
|
||||
doc.setFontSize(defaults.pdfFontSize);
|
||||
|
||||
// Header
|
||||
var startColPosition=defaults.pdfLeftMargin;
|
||||
$(el).find('thead').find('tr').each(function() {
|
||||
$(this).filter(':visible').find('th').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
var colPosition = startColPosition+ (index * 50);
|
||||
doc.text(colPosition,20, parseString($(this)));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Row Vs Column
|
||||
var startRowPosition = 20; var page =1;var rowPosition=0;
|
||||
$(el).find('tbody').find('tr').each(function(index,data) {
|
||||
rowCalc = index+1;
|
||||
|
||||
if (rowCalc % 26 == 0){
|
||||
doc.addPage();
|
||||
page++;
|
||||
startRowPosition=startRowPosition+10;
|
||||
}
|
||||
rowPosition=(startRowPosition + (rowCalc * 10)) - ((page -1) * 280);
|
||||
|
||||
$(this).filter(':visible').find('td').each(function(index,data) {
|
||||
if ($(this).css('display') != 'none'){
|
||||
if(defaults.ignoreColumn.indexOf(index) == -1){
|
||||
var colPosition = startColPosition+ (index * 50);
|
||||
doc.text(colPosition,rowPosition, parseString($(this)));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Output as Data URI
|
||||
doc.output('datauri');
|
||||
|
||||
}
|
||||
|
||||
|
||||
function parseString(data){
|
||||
|
||||
if(defaults.htmlContent == 'true'){
|
||||
content_data = data.html().trim();
|
||||
}else{
|
||||
content_data = data.text().trim();
|
||||
}
|
||||
|
||||
if(defaults.escape == 'true'){
|
||||
content_data = escape(content_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return content_data;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
@ -161,7 +161,9 @@
|
||||
<th>Balance
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
|
||||
<th>Reason
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
<th class="center" ng-click="sort('Status')">Status
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Status'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
@ -188,7 +190,7 @@
|
||||
<td>{{p.ModeOfPayment}}</td>
|
||||
<td>{{p.Amount}}</td>
|
||||
<td>{{p.Balance}}</td>
|
||||
|
||||
<td>{{p.Reason}}</td>
|
||||
<!--<td class="center" tooltip="{{p.Approval_Comments}}" ng-if="p.ListName == 'Income'">
|
||||
- </td>-->
|
||||
<td class="center" tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
@ -205,7 +207,7 @@
|
||||
<td class="center" ng-if="p.Status == 'Pending'">
|
||||
<span ng-if=" p.PaymentStatus == 1 ">
|
||||
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||
<!--<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleEditEntry(p.ID)"></i> </span>-->
|
||||
<!--<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleted(p.ID)"></i> </span>-->
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -161,7 +161,9 @@
|
||||
<th>Balance
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
|
||||
<th>Reason
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
<th class="center" ng-click="sort('Status')">Status
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Status'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
@ -188,7 +190,7 @@
|
||||
<td>{{p.ModeOfPayment}}</td>
|
||||
<td>{{p.Amount}}</td>
|
||||
<td>{{p.Balance}}</td>
|
||||
|
||||
<td>{{p.Reason}}</td>
|
||||
<!--<td class="center" tooltip="{{p.Approval_Comments}}" ng-if="p.ListName == 'Income'">
|
||||
- </td>-->
|
||||
<td class="center" tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
@ -200,13 +202,13 @@
|
||||
<td class="center" ng-if="p.ListName == 'Income' && p.Status != 'Cancel' ">
|
||||
<span ng-if=" p.PaymentStatus == 1 "> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||
<span ng-if=" p.PaymentStatus == 0 ">
|
||||
<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleteFeePayableEntry(p.ID)"></i>
|
||||
<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleted1(p.ID)"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td class="center" ng-if="p.Status == 'Pending' && p.Status != 'Cancel'">
|
||||
<span ng-if=" p.PaymentStatus == 1 ">
|
||||
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||
<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleEditEntry(p.ID)"></i> </span>
|
||||
<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleted(p.ID)"></i> </span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -96,8 +96,8 @@
|
||||
/*font-size: 16px;*/
|
||||
}
|
||||
</style>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<button ng-click="exportData()">export</button>
|
||||
<table class="table table-bordered export-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="sort('Date')">Date
|
||||
@ -313,7 +313,7 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.addDate.$dirty && Form.addDate.$invalid, 'has-success':Form.addDate.$valid}">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.addDate.$dirty && Form.addDate.$invalid, 'has-success':Form.addDate.$valid}">
|
||||
<label>
|
||||
Date <span
|
||||
class="symbol required"></span>
|
||||
@ -329,7 +329,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.addName.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.addName.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Income/Expense <span class="symbol required"></span>
|
||||
</label>
|
||||
@ -385,7 +385,7 @@
|
||||
Type <span class="symbol required"></span>
|
||||
</label>
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModelAdd.type" required>
|
||||
|
||||
<option value="" disabled selected>Select Type</option>
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
|
||||
|
||||
@ -69,7 +69,16 @@
|
||||
<div class="row">
|
||||
<div ng-if="resData.length > 0">
|
||||
<div class="table-responsive">
|
||||
|
||||
<style>
|
||||
.containersPara {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 220px;
|
||||
max-width: 360px;
|
||||
overflow: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -84,7 +93,9 @@
|
||||
</thead>
|
||||
<tbody dir-paginate="p in resData|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:3">
|
||||
<tr>
|
||||
<td>{{p.MsgBody}}</td>
|
||||
<td><div class="containersPara">{{p.MsgBody}}
|
||||
</div>
|
||||
</td>
|
||||
<td>{{p.MSG_SEND_CNT}}</td>
|
||||
<td>{{p.CreatedOn}}</td>
|
||||
<td class="center">
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
<!-- /// controller: 'UserCtrl' - localtion: assets/js/controllers/sendSMSsuperadminCtrl.js /// -->
|
||||
<div ng-controller="sendSMSsuperadminCtrl" ng-init="init()">
|
||||
<!--<h1>D</h1>-->
|
||||
<tabset class="tabbable">
|
||||
<tab heading="Send Student Messages" id="viewDayBook">
|
||||
<div class="row">
|
||||
<!--<div class="col-md-3">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="Send Student Messages" id="viewDayBook">
|
||||
<div class="row">
|
||||
<!--<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
Select Branch
|
||||
</label>
|
||||
@ -28,499 +28,450 @@
|
||||
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
|
||||
</select>
|
||||
</div>-->
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
University
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="myUniv" ng-change="getUniveId(myUniv)">
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="myUniv" ng-change="getUniveId(myUniv)">
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="item in universityData" value="{{item}}">{{item.UniversityName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
Batch
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="batch" ng-model="searchData.Batch" ng-change="getValueChange()">
|
||||
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="batch" ng-model="searchData.Batch" ng-change="getValueChange()">
|
||||
<option value="" selected>Select Batch</option>
|
||||
<option ng-repeat="itemBatch in batchData" value="{{itemBatch.BatchCode}}">{{itemBatch.BatchName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
Course
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="course" ng-model="searchData.Course" ng-change="getValueChange()">
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="course" ng-model="searchData.Course" ng-change="getValueChange()">
|
||||
<option value="" selected>Select Course</option>
|
||||
<option ng-repeat="itemCourse in courseData" value="{{itemCourse.CourseID}}">{{itemCourse.CourseName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!--<pre>{{ branchList_data }}</pre>-->
|
||||
<!--<pre>{{ studentListDetails | json }}</pre>-->
|
||||
<!--<pre>{{ searchResultLength }}</pre>-->
|
||||
|
||||
<div>
|
||||
<!--// student search result-->
|
||||
<div ng-if="searchLoading === true">
|
||||
<!--search loading start-->
|
||||
<div style="padding: auto 0; color: #007AFF; font-weight: bold; text-align:center;
|
||||
margin-top: 25px;">
|
||||
<h4 style="color: inherit">fetching...</h4>
|
||||
</div>
|
||||
<!--search loading end-->
|
||||
</div>
|
||||
|
||||
<div ng-if="searchLoading === false">
|
||||
<div class="col-md-12" ng-if="searchResultStatus == false" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
records found... </h4></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="searchResultStatus == true">
|
||||
<div class="col-md-12" ng-if="searchResultLength === 0" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
records found... </h4></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" ng-if="searchResultLength > 0">
|
||||
<!--// search-->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
|
||||
</div>
|
||||
<!--<pre>{{ branchList_data }}</pre>-->
|
||||
<!--<pre>{{ studentListDetails | json }}</pre>-->
|
||||
<!--<pre>{{ searchResultLength }}</pre>-->
|
||||
|
||||
<div>
|
||||
<!--// student search result-->
|
||||
<div ng-if="searchLoading === true">
|
||||
<!--search loading start-->
|
||||
<div style="padding: auto 0; color: #007AFF; font-weight: bold; text-align:center;
|
||||
margin-top: 25px;">
|
||||
<h4 style="color: inherit">fetching...</h4>
|
||||
</div>
|
||||
<!--search loading end-->
|
||||
</div>
|
||||
|
||||
<div ng-if="searchLoading === false">
|
||||
<div class="col-md-12" ng-if="searchResultStatus == false" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
records found... </h4></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="searchResultStatus == true">
|
||||
<div class="col-md-12" ng-if="searchResultLength === 0" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
records found... </h4></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" ng-if="searchResultLength > 0">
|
||||
<!--// search-->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label for="form-field-select-2">
|
||||
Mobile Number
|
||||
</label>
|
||||
<script>
|
||||
$(function () {
|
||||
$("#search").focus();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.sort-icon {
|
||||
font-size: 9px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
$("#search").focus();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.sort-icon {
|
||||
font-size: 9px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
th {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<input class="form-control" type="text" ng-change="mySearchChangeFunc(search.MobileNumber)" ng-model="search"
|
||||
id="search" autofocus tabindex="1" placeholder="Search Mobile" /><br><br>
|
||||
th {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<input class="form-control" type="text" ng-change="mySearchChangeFunc(search.MobileNumber)" ng-model="search" id="search"
|
||||
autofocus tabindex="1" placeholder="Search Mobile" /><br><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover" ng-controller="studentModalDemoCtrl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
|
||||
ng-click="openScreenSen()"/>
|
||||
</th>
|
||||
<th ng-click="sort('Firstname')">First Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Lastname')">Last Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('MobileNumber')">MobileNumber
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('EmailID')">Email ID
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('CourseName')">Course
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in searchResultDetails|filter:search:strict|orderBy:sortKey:reverse|itemsPerPage:10">
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
<table class="table table-hover" ng-controller="studentModalDemoCtrl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
|
||||
ng-click="openScreenSen()" />
|
||||
</th>
|
||||
<th ng-click="sort('Firstname')">First Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Lastname')">Last Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('MobileNumber')">MobileNumber
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('EmailID')">Email ID
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('CourseName')">Course
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in searchResultDetails|filter:search:strict|orderBy:sortKey:reverse|itemsPerPage:10">
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" ng-model="p.Selected" ng-bind="values = p.StudentID" ng-change="setOneSelect(p)"
|
||||
ng-click="openScreenSen()" />
|
||||
</label>
|
||||
</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
|
||||
<td>{{p.Lastname}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
|
||||
<td>{{p.EmailID}}</td>
|
||||
<td>{{p.CourseName}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
|
||||
<td>{{p.Lastname}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
|
||||
<td>{{p.EmailID}}</td>
|
||||
<td>{{p.CourseName}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="OpenWindowStatus">
|
||||
<style>
|
||||
#cancel_button {
|
||||
/*line-height: 12px;
|
||||
<div ng-if="OpenWindowStatus">
|
||||
<style>
|
||||
#cancel_button {
|
||||
/*line-height: 12px;
|
||||
width: 18px;
|
||||
font-size: 8pt;
|
||||
font-family: tahoma;*/
|
||||
margin-top: 1px;
|
||||
margin-right: 2px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
margin-top: 1px;
|
||||
margin-right: 2px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.target>div:target {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, msg_details)" method="post">
|
||||
<div id="bottom1" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
.target>div:target {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, msg_details)" method="post">
|
||||
<div id="bottom1" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<fieldset style="background-color: #eaeaea;">
|
||||
<legend>
|
||||
SMS Details
|
||||
</legend>
|
||||
<!--<div>
|
||||
<div class="col-md-6">
|
||||
<fieldset style="background-color: #eaeaea;">
|
||||
<legend>
|
||||
SMS Details
|
||||
</legend>
|
||||
<!--<div>
|
||||
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
|
||||
<span class="glyphicon glyphicon-remove-circle"></span>
|
||||
</a>
|
||||
</div>-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8 form-group" ng-class="{'has-error':Form.Messagebody.$dirty && Form.Messagebody.$invalid, 'has-success':Form.Messagebody.$valid}">
|
||||
<label>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8 form-group" ng-class="{'has-error':Form.Messagebody.$dirty && Form.Messagebody.$invalid, 'has-success':Form.Messagebody.$valid}">
|
||||
<label>
|
||||
Message body <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Message body" tabindex="7" class="form-control" name="Messagebody" ng-model="msg_details.content"
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.Messagebody.$dirty && Form.Messagebody.$error.pattern">Invalid Message body</span>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
<textarea type="text" placeholder="Enter Message body" tabindex="7" class="form-control" name="Messagebody" ng-model="msg_details.content"
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.Messagebody.$dirty && Form.Messagebody.$error.pattern">Invalid Message body</span>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i>
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" tabindex="9" class="btn btn-warning btn-sm" tabindex="9" ng-click="statusUpdate.reset(Form)">
|
||||
<button type="reset" tabindex="9" class="btn btn-warning btn-sm" tabindex="9" ng-click="statusUpdate.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--studen search result end-->
|
||||
</div>
|
||||
</div>
|
||||
<!--studen search result end-->
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="Send Promotional Messages">
|
||||
<style>
|
||||
.mobileNumberList {
|
||||
margin: 6px;
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.mobileNumberList ul {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.mobileNumberList ul li{
|
||||
padding: 4px 2px;
|
||||
margin: 1px 2px;
|
||||
border: 1px solid gray;
|
||||
border-radius: 4px;
|
||||
background: #70a5d0;
|
||||
color: #000;
|
||||
}
|
||||
.deletBtn {
|
||||
margin: 0 2px;
|
||||
padding: 2px;
|
||||
background: #2ba3ca;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #469cad;
|
||||
cursor: pointer;
|
||||
color: #063742;
|
||||
}
|
||||
.deletBtn:hover{
|
||||
background: #2ac3ca;
|
||||
}
|
||||
.lableValue{
|
||||
margin: 0 4px;
|
||||
}
|
||||
.addBtn{
|
||||
margin: 1px 2px;
|
||||
padding: 4px 6px;
|
||||
text-transform: uppercase;
|
||||
background: #de1072;
|
||||
border: none;
|
||||
color: #dadada;
|
||||
border-radius: 4px;
|
||||
clear: both;
|
||||
}
|
||||
.inputCls{
|
||||
padding: 7px 4px;
|
||||
}
|
||||
</style>
|
||||
<form name="Form" id="form" novalidate ng-submit="composeMsg.submit(Form)" method="post">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" ng-class="{'has-error':Form.addMessage.$dirty && Form.addMessage.$invalid, 'has-success':Form.addMessage.$valid}">
|
||||
<label>
|
||||
</tab>
|
||||
<tab heading="Send Promotional Messages">
|
||||
<style>
|
||||
.mobileNumberList {
|
||||
margin: 6px;
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
border: 1px solid gray;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.mobileNumberList ul {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mobileNumberList ul li {
|
||||
padding: 4px 2px;
|
||||
margin: 1px 2px;
|
||||
border: 1px solid gray;
|
||||
border-radius: 4px;
|
||||
background: #70a5d0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.deletBtn {
|
||||
margin: 0 2px;
|
||||
padding: 2px;
|
||||
background: #2ba3ca;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #469cad;
|
||||
cursor: pointer;
|
||||
color: #063742;
|
||||
}
|
||||
|
||||
.deletBtn:hover {
|
||||
background: #2ac3ca;
|
||||
}
|
||||
|
||||
.lableValue {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.addBtn {
|
||||
margin: 1px 2px;
|
||||
padding: 4px 6px;
|
||||
text-transform: uppercase;
|
||||
background: #de1072;
|
||||
border: none;
|
||||
color: #dadada;
|
||||
border-radius: 4px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.inputCls {
|
||||
padding: 7px 4px;
|
||||
}
|
||||
</style>
|
||||
<form name="Form" id="form" novalidate ng-submit="composeMsg.submit(Form)" method="post">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6" ng-class="{'has-error':Form.addMessage.$dirty && Form.addMessage.$invalid, 'has-success':Form.addMessage.$valid}">
|
||||
<label>
|
||||
Message :<span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Message Details" tabindex="3" class="form-control inputCls" name="addMessage"
|
||||
ng-model="mobileNumList.message"
|
||||
required maxlength="300" />
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
||||
<span class="error text-small block" ng-if="Form.addMessage.$dirty && Form.addMessage.$error.required">Message is Required </span>
|
||||
<textarea type="text" placeholder="Enter Message Details" tabindex="3" class="form-control inputCls" name="addMessage" ng-model="mobileNumList.message"
|
||||
required maxlength="300" />
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 300 Characters.</span>
|
||||
<span class="error text-small block" ng-if="Form.addMessage.$dirty && Form.addMessage.$error.required">Message is Required </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!--<div class="col-md-4">
|
||||
|
||||
<label>Mobile Number : <span class="symbol required"></span>
|
||||
</label>
|
||||
<div>
|
||||
<input type="text" class="form-control inputCls" placeholder="Enter Mobile Number"
|
||||
ng-model="mobileNumList.mobile" name="mobile" ng-pattern="/^[0-9-+]*$/" minlength="6" maxlength="13">
|
||||
<span class="error text-small block" ng-if="addressForm.mobile.$error.pattern && addressForm.mobile.$error.minlength && addressForm.mobile.$error.maxlength">Valid Mobile is Required </span>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<i ng-click="composeMsgNumber()" class="addBtn" >add</i>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>
|
||||
</label>
|
||||
</div>-->
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<label>
|
||||
<label>
|
||||
<input type="radio" ng-model="message" value="false" ng-click="string(message)">
|
||||
Number
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<label>
|
||||
<input type="radio" ng-model="message" value="true" ng-click="string(message)">
|
||||
Group
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" ng-if="radio==1">
|
||||
|
||||
<label>Multiple Mobile Numbers : <span class="symbol required"></span>
|
||||
</label>
|
||||
<div>
|
||||
<textarea type="text" placeholder="Enter Multiple Mobile Numbers" tabindex="5" class="form-control inputCls" name="addMulipleNumbers"
|
||||
ng-model="mobileNumList.multipleMobile"
|
||||
/>
|
||||
<span><b>Note:</b> Mobile Numbers Must Be Valid And Separate by commas(<b>eg : </b> 9876543210, 9786543210, ...)</span>
|
||||
<span class="error text-small block" ng-if="addressForm.mobile.$error.pattern && addressForm.mobile.$error.minlength && addressForm.mobile.$error.maxlength">Valid Mobile is Required </span>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<i ng-click="composeMsgMultipleNumber()" class="addBtn" >add</i>
|
||||
</div>
|
||||
|
||||
<!--ng-click="addContactsList(mobileNumList)"-->
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" ng-if="radio==1">
|
||||
<div class="mobileNumberList">
|
||||
<ul>
|
||||
<li ng-repeat="num in listMobileNums track by $index"><span class="lableValue">{{num}}</span><span class="deletBtn" ng-click="deletMobileList(num)">X</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<div>
|
||||
<label>Mobile Numbers : </label> <textarea class="inputCls" ng-model="mobileNumList.mobile"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label>Mobile Numbers : </label> <input type="text" class="inputCls" ng-model="mobileNumList.mobile"><button class="addBtn" ng-click="addContactsList(mobileNumList)">add</button>
|
||||
</div>-->
|
||||
|
||||
<div class="row" ng-if="radio==1">
|
||||
<div class="pull-left">
|
||||
<button type="submit" ng-disabled="disableSendButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
<div class="row">
|
||||
<div class="col-md-4" ng-if="radio==1">
|
||||
|
||||
<label>Multiple Mobile Numbers : <span class="symbol required"></span>
|
||||
</label>
|
||||
<div>
|
||||
<textarea type="text" placeholder="Enter Multiple Mobile Numbers" tabindex="5" class="form-control inputCls" name="addMulipleNumbers"
|
||||
ng-model="mobileNumList.multipleMobile" />
|
||||
<span><b>Note:</b> Mobile Numbers Must Be Valid And Separate by commas(<b>eg : </b> 9876543210, 9786543210, ...)</span>
|
||||
<span class="error text-small block" ng-if="addressForm.mobile.$error.pattern && addressForm.mobile.$error.minlength && addressForm.mobile.$error.maxlength">Valid Mobile is Required </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" ng-if="radio==1">
|
||||
<i ng-click="composeMsgMultipleNumber()" class="addBtn">add</i>
|
||||
</div>
|
||||
<div class="col-md-6" ng-if="radio==1">
|
||||
<div class="mobileNumberList">
|
||||
<ul>
|
||||
<li ng-repeat="num in listMobileNums track by $index"><span class="lableValue">{{num}}</span><span class="deletBtn" ng-click="deletMobileList(num)">X</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" ng-if="radio==1">
|
||||
<div class="pull-left">
|
||||
<button type="submit" ng-disabled="disableSendButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
<i class='fa fa-spinner fa-spin' ng-if="disableSendButton"> </i>Send
|
||||
</button>
|
||||
<!--<button type="cancel" ng-click="daybookAdd.reset(Form)" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
|
||||
Reset
|
||||
</button>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="radio==2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="mobileNumList.grouptype" ng-Change="getall_Numbers(mobileNumList.grouptype);" required>
|
||||
<option value="-1"> SELECT </option>
|
||||
<option ng-repeat="p in statusInfo" value="{{p.ID}}"">{{p.GroupName}}</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<textarea rows="4" col="3" class="form-control" name="content" ng-model="numbers"></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</br>
|
||||
<!-- <div class="col-md-6">
|
||||
|
||||
<textarea rows="4" col="3" class="form-control" name="content" ng-model="numbers"></textarea>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="col-offset" ng-repeat="i in allnum">
|
||||
<div >
|
||||
{{i.Phone_No}}
|
||||
</div>
|
||||
</div> -->
|
||||
<br/>
|
||||
|
||||
<div class="col-md-12">
|
||||
<br/>
|
||||
<div class="pull-left">
|
||||
<input type="button" class="btn btn-sm btn-success" tabindex="10" value="Send" ng-click="sendgroup(Form);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
|
||||
<tab heading="Manage Groups">
|
||||
|
||||
|
||||
<form name="Form" id="Form" novalidate ng-submit="AddGroup.submit(Form,myModel)" method="post">
|
||||
<fieldset>
|
||||
<legend>Add New</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="">
|
||||
<label>
|
||||
Group Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Group Name" tabindex="1" class="form-control" name="GroupName" ng-model="myModel.GroupName"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" capitalize required/>
|
||||
<span class="error text-small block" ng-if="Form.GroupName.$dirty && Form.GroupName.$error.required">Group Name is required</span>
|
||||
<span class="error text-small block" ng-if="Form.GroupName.$dirty && Form.GroupName.$error.pattern">Invalid Group Name </span>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top: 2.3%;">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ladda="ldloading1.zoom_in" tabindex="2" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="radio==2">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="mobileNumList.grouptype"
|
||||
ng-Change="getall_Numbers(mobileNumList.grouptype);" required>
|
||||
<option value="" disabled selected>Select Group</option>
|
||||
<option ng-repeat="p in statusInfo" value="{{p.ID}}">{{p.GroupName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<textarea rows="4" col="3" class="form-control" name="content" ng-model="numbers"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<br/>
|
||||
<div class="pull-left">
|
||||
<input type="button" class="btn btn-sm btn-success" tabindex="10" value="Send" ng-click="sendgroup(Form);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
</tab>
|
||||
<tab heading="Manage Groups">
|
||||
|
||||
|
||||
<form name="Form" id="Form" novalidate ng-submit="AddGroup.submit(Form,myModel)" method="post">
|
||||
<fieldset>
|
||||
<legend>Add New</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="">
|
||||
<label>
|
||||
Group Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Group Name" tabindex="1" class="form-control" name="GroupName" ng-model="myModel.GroupName"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" capitalize required/>
|
||||
<span class="error text-small block" ng-if="Form.GroupName.$dirty && Form.GroupName.$error.required">Group Name is required</span>
|
||||
<span class="error text-small block" ng-if="Form.GroupName.$dirty && Form.GroupName.$error.pattern">Invalid Group Name </span>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top: 2.3%;">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ladda="ldloading1.zoom_in" tabindex="2" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<table class="table table-hover" ng-init="initgroup();">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th ng-click="sort('ListName')">Group Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"> </span>
|
||||
</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- {{statusInfo}} -->
|
||||
<tbody dir-paginate="p in statusInfo|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
|
||||
<td>{{p.GroupName}}</td>
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
|
||||
<td>
|
||||
<a class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID);"><b class="fa fa-hover fa-plus" tooltip="Add Contact" aria-hidden="true"></b>
|
||||
<table class="table table-hover" ng-init="initgroup();">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th ng-click="sort('ListName')">Group Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"> </span>
|
||||
</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- {{statusInfo}} -->
|
||||
<tbody dir-paginate="p in statusInfo|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
|
||||
<td>{{p.GroupName}}</td>
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
|
||||
<td>
|
||||
<a class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID);"><b class="fa fa-hover fa-plus" tooltip="Add Contact" aria-hidden="true"></b>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-if="p.IsActive==true">
|
||||
<div ng-if="p.IsActive==true">
|
||||
|
||||
<switch ng-change="statusactive(p.ID,p.IsActive)" ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
<switch ng-change="statusactive(p.ID,p.IsActive)" ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-change="statusactive(p.ID,p.IsActive)" ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-change="statusactive(p.ID,p.IsActive)" ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr ng-show="editId === p.ID" ng-if="editId === p.ID">
|
||||
<td colspan="12" ng-include src="'assets/views/addcontact.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.ID" ng-if="editId === p.ID">
|
||||
<td colspan="12" ng-include src="'assets/views/addcontact.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
|
||||
|
||||
</tab>
|
||||
</tabset>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.student.status.APPLICATION">{{ mainTitle }}</h1>
|
||||
<span class="mainDescription">Update application status.</span>
|
||||
<span class="mainDescription">Update certificate status.</span>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
|
||||
@ -76,6 +76,10 @@
|
||||
<script src="assets/js/main.js"></script>
|
||||
<script src="assets/js/config.constant.js"></script>
|
||||
<script src="assets/js/config.router.js"></script>
|
||||
|
||||
<!--Export table data Internal jquery plugin-->
|
||||
<script type="text/javascript" src="assets/js/tableExport/tableExport.js"></script>
|
||||
<script type="text/javascript" src="assets/js/tableExport/jquery.base64.js"></script>
|
||||
|
||||
|
||||
<!-- Clip-Two Directives -->
|
||||
@ -96,6 +100,7 @@
|
||||
<script src="assets/js/directives/touchspin.js"></script>
|
||||
<script src="assets/js/directives/file-upload.js"></script>
|
||||
<script src="assets/js/directives/convert-words.js"></script>
|
||||
<script src="assets/js/directives/table-export.js"></script>
|
||||
<!-- Clip-Two Controllers -->
|
||||
<script src="assets/js/controllers/mainCtrl.js"></script>
|
||||
<script src="assets/js/controllers/bootstrapCtrl.js"></script>
|
||||
@ -120,6 +125,7 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/alasql/0.4.2/alasql.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.9.2/xlsx.core.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/2.3.3/jspdf.plugin.autotable.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user