Permalink
Browse files

moved to new printing lib print-js

  • Loading branch information...
born2net@gmail.com
born2net@gmail.com committed Mar 24, 2018
1 parent 354766e commit 316e8f997f7eaba21d54a769440594510057b80f
Showing with 43 additions and 9 deletions.
  1. +3 −2 package.json
  2. +1 −0 src/app/app-module.ts
  3. +28 −6 src/app/fasterq/fasterq-terminal.ts
  4. +6 −1 src/styles/style.css
  5. +5 −0 src/typings.d.ts
@@ -1,6 +1,6 @@
{
"name": "studioweb",
"version": "0.1.770",
"version": "0.1.774",
"license": "Modified GPL (see readme.md)",
"angular-cli": {},
"scripts": {
@@ -14,7 +14,7 @@
"x_prod_jit": "ng build --target=production --base-href ./ --aot fiw.alse",
"x_prod_aot": "ng build --target=production --base-href ./ --aot true",
"x_prod_aot_hebrew": "ng build --locale iw -i18n-file src/locale/iw.xtb --i18n-format xtb --target=production --base-href ./ --aot true",
"x_rsync": "rsync --progress --chmod=ug=rwx --chmod=o=rx -av --stats -e ssh /cygdrive/c/msweb/studiolite/dist/ Sean@digitalsignage.com:/var/www/sites/dynasite/htdocs/_msportal/_js/_node/_studioweb",
"x_rsync": "rsync --progress --chmod=ug=rwx --chmod=o=rx -av --stats -e ssh /cygdrive/c/msweb/studiolite/dist/ Sean@secure.digitalsignage.com:/var/www/sites/dynasite/htdocs/_msportal/_js/_node/_studioweb",
"x_rsync_docs": "rsync --progress --chmod=ug=rwx --chmod=o=rx -av --stats -e ssh /cygdrive/c/msweb/studiolite/documentation/ Sean@digitalsignage.com:/var/www/sites/mediasignage.com/htdocs/lite_docs",
"x_rsync_iw": "rsync --progress --chmod=ug=rwx --chmod=o=rx -av --stats -e ssh /cygdrive/c/msweb/studiolite/dist/ Sean@digitalsignage.com:/var/www/sites/dynasite/htdocs/_msportal/_js/_node/_studioweb/locale/iw",
"x_sw": "sw-precache --root=dist --config=sw-precache-config.js",
@@ -79,6 +79,7 @@
"ngx-contextmenu": "^1.0.3",
"platform": "^1.3.3",
"primeng": "^4.0.0-rc.2",
"print-js": "^1.0.34",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
"reselect": "^2.5.4",
@@ -37,6 +37,7 @@ import {SharedModule} from "../modules/shared.module";
import {Dashboard} from "./dashboard/dashboard-navigation";
import {Appwrap} from "./appwrap";
import "hammerjs";
import "print-js";
import "gsap";
import "gsap/CSSPlugin";
import "gsap/Draggable";
@@ -53,24 +53,30 @@ import {LocalStorage} from "../../services/LocalStorage";
<div id="printDiag" style="display: none">
<h1>You number is 123</h1>
<h3 id="printData">Oct 1 1973</h3>
</div>
<div id="terminalCarousel" class="carousel slide" data-interval="false" data-ride="carousel">
<div class="carousel-inner">
<!--<div id="hiddenPrint" *ngIf="m_printing" >-->
<!--<h2>{{m_serviceId}}</h2>-->
<!--<h2>{{m_lineName}}</h2>-->
<!--</div>-->
<div class="item active">
<div style="width: 100%; text-align: center">
<i style="font-size: 3em; padding-right: 40px" class="carouselLargeHeader fa fa-print"></i>
<span class="carouselLargeHeader" style="font-size: 3em">Print your queue number</span>
<br/>
<br/>
<br/>
<a (click)="_onPrint($event)" id="fqPrintNumber" style="padding-left: 40px; padding-right: 40px; padding-top: 20px; padding-bottom: 20px" class="btn btn-large btn-danger" type="button" href="#">
<span class="largeFont2em" data-localize="printIt">PRINT IT</span>
</a>
<h1 id="fqDisplayPrintNumber">{{m_displayServiceId}}</h1>
<div id="printArea" *ngIf="m_printing">
<h2 id="fqDisplayPrintNumber">Your line#: {{m_displayServiceId}}</h2>
<h2>Line name: {{m_lineName}}</h2>
</div>
<br/>
<br/>
<br/>
@@ -168,6 +174,9 @@ export class FasterqTerminal extends Compbaser implements AfterViewInit {
m_remoteStatusVerification;
m_statusHandler;
m_currentlyServing = 0;
m_printing = false;
m_serviceId = 0;
m_lineName = '';
constructor(private toastr: ToastsManager, private http: Http, private yp: YellowPepperService, private router: ActivatedRoute, private el: ElementRef, private zone: NgZone, private simplestorage: LocalStorage) {
super();
@@ -489,7 +498,19 @@ export class FasterqTerminal extends Compbaser implements AfterViewInit {
.subscribe((i_response: Response) => {
var jData = i_response.json()
this.m_displayServiceId = jData.service_id;
this._printNumber(jData.service_id, jData.name);
this.m_serviceId = jData.service_id;
this.m_lineName = jData.name;
this.m_printing = true;
setTimeout(()=>{
printJS('printArea', 'html')
},1000);
setTimeout(()=>{
this.m_printing = false;
},2000)
return;
// this._printNumber(jData.service_id, jData.name);
}, (e) => console.error(e));
}
@@ -507,7 +528,8 @@ export class FasterqTerminal extends Compbaser implements AfterViewInit {
jQuery('body').append('<h2></h2>')
}
var arg = Lib.Base64Encode(i_service_id + ':_:' + name)
$printDiag.html('<iframe src="print.html?serviceId=' + arg + '" onload="this.contentWindow.print();"></iframe>');
// $printDiag.html('<iframe src="print.html?serviceId=' + arg + '" onload="this.contentWindow.print();"></iframe>');
$printDiag.html('<iframe src="print.html?serviceId=' + arg + '"></iframe>');
})
// $printDiag.find('h1').text('your number is ' + i_service_id);
@@ -546,5 +568,5 @@ export class FasterqTerminal extends Compbaser implements AfterViewInit {
return `${this.appBaseUrlServices}/studioweb/index.html?mode=remoteStatus&param=${data}`;
}
}
@@ -8,6 +8,11 @@
/*unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;*/
/*}*/
@media print {
@page { margin: 0; }
body { margin: 1.6cm; }
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
@@ -1585,12 +1590,12 @@ div.kineticjs-content {
/**dev_mode_start**/
small.debug {
color: red;
display: none !important;
}
small.release {
text-transform: lowercase;
color: #4c4c4c;
display: none !important;
}
/**dev_mode_end**/
@@ -141,6 +141,11 @@ interface JQuery {
}
declare var Draggable;
declare function printJS(a:any, b:any): any;
declare var con: Con;
declare var jXML: JQueryStatic;
declare var jQueryAny: JQueryStatic | any;

0 comments on commit 316e8f9

Please sign in to comment.