Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Active_Client.Browser_Tools
|
||||
|
||||
private static readonly string[] _validExtensions = {".json", ".rcp", ".tpl" };
|
||||
//private static readonly string[] _validExtensions = { "", ".txt", ".cnc", ".cn", ".cno", ".ini", ".mpf", ".spf", ".tap", ".anc", ".iso" };
|
||||
private static readonly string[] _validImages = { ".jpg", ".jpeg", ".png", ".svg" };
|
||||
private static readonly string[] _validImages = { ".svg" };
|
||||
private static string jobPath = "";
|
||||
private static Dictionary<string, IntPtr> _editorOpened = new Dictionary<string, IntPtr>();
|
||||
private static EditorVar _currentEditorObject = new EditorVar();
|
||||
@@ -516,6 +516,11 @@ namespace Active_Client.Browser_Tools
|
||||
try
|
||||
{
|
||||
File.Delete(p);
|
||||
string images = Path.ChangeExtension(p, "svg");
|
||||
if(File.Exists(images))
|
||||
{
|
||||
File.Delete(images);
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
@@ -810,7 +815,10 @@ namespace Active_Client.Browser_Tools
|
||||
{
|
||||
if (File.Exists(imageDirectory + "/" + imagePath + ext))
|
||||
{
|
||||
file.PreviewBase64 = "data:image/" + ext + ";base64," + Convert.ToBase64String(File.ReadAllBytes(imageDirectory + "/" + imagePath + ext));
|
||||
if (ext.ToLower().Equals(".svg"))
|
||||
file.PreviewBase64 = File.ReadAllText(imageDirectory + "/" + imagePath + ext);
|
||||
else
|
||||
file.PreviewBase64 = "data:image/" + ext + ";base64," + Convert.ToBase64String(File.ReadAllBytes(imageDirectory + "/" + imagePath + ext));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1504,7 +1504,6 @@
|
||||
.title_lbl,
|
||||
.description_lbl {
|
||||
margin-top: 22px;
|
||||
margin-left: 24px;
|
||||
font-size: 14px;
|
||||
color: @color-warm-grey;
|
||||
margin-bottom: 4px;
|
||||
@@ -2447,6 +2446,9 @@
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
@@ -2486,6 +2488,11 @@
|
||||
overflow-x: hidden;
|
||||
height: calc(~"100% - 360px");
|
||||
flex-flow: column;
|
||||
|
||||
.key {
|
||||
width: 200px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.row {
|
||||
width: 99%;
|
||||
@@ -3438,7 +3445,7 @@
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #cccccc;
|
||||
background: #ffffff;
|
||||
top: 0;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
@@ -4129,8 +4136,7 @@
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
.title_lbl,
|
||||
.description_lbl {
|
||||
.title_lbl {
|
||||
margin-top: 22px;
|
||||
margin-left: 24px;
|
||||
font-size: 14px;
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
|
||||
article {
|
||||
|
||||
label {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 5px;
|
||||
|
||||
@@ -12,6 +12,23 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
.notes_textarea{
|
||||
border-radius: 2px;
|
||||
height: 97px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: solid 1px #bbbcbc;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.description_lbl{
|
||||
margin-top: 22px;
|
||||
font-size: 14px;
|
||||
color: #878787;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.tab-header {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
@@ -173,7 +190,7 @@
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 82px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
@@ -10,6 +10,21 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
.setup .notes_textarea {
|
||||
border-radius: 2px;
|
||||
height: 97px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: solid 1px #bbbcbc;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
}
|
||||
.setup .description_lbl {
|
||||
margin-top: 22px;
|
||||
font-size: 14px;
|
||||
color: #878787;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.setup .tab-header {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
@@ -144,7 +159,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
.setup .modal section.body footer {
|
||||
height: 82px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
@@ -1648,7 +1663,6 @@ article .box .body {
|
||||
.modal.create-maintenance .title .description_lbl,
|
||||
.modal.create-maintenance .description .description_lbl {
|
||||
margin-top: 22px;
|
||||
margin-left: 24px;
|
||||
font-size: 14px;
|
||||
color: #878787;
|
||||
margin-bottom: 4px;
|
||||
@@ -2602,6 +2616,9 @@ article .box .body {
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image .container img,
|
||||
.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image .container img,
|
||||
@@ -2648,6 +2665,13 @@ article .box .body {
|
||||
height: calc(100% - 360px);
|
||||
flex-flow: column;
|
||||
}
|
||||
.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .key,
|
||||
.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .key,
|
||||
.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .key,
|
||||
.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .key {
|
||||
width: 200px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row,
|
||||
.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row,
|
||||
.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row,
|
||||
@@ -3467,7 +3491,7 @@ article .box .body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #cccccc;
|
||||
background: #ffffff;
|
||||
top: 0;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
@@ -4060,9 +4084,7 @@ article .box .body {
|
||||
flex-flow: column;
|
||||
}
|
||||
.modal.create-user .title .title_lbl,
|
||||
.modal.create-user .description .title_lbl,
|
||||
.modal.create-user .title .description_lbl,
|
||||
.modal.create-user .description .description_lbl {
|
||||
.modal.create-user .description .title_lbl {
|
||||
margin-top: 22px;
|
||||
margin-left: 24px;
|
||||
font-size: 14px;
|
||||
@@ -5074,7 +5096,9 @@ article .box .body {
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%);
|
||||
height: 48px;
|
||||
display: grid;
|
||||
grid-template-columns: 48px 101px;
|
||||
grid-template-rows: 48px;
|
||||
}
|
||||
.modal.processo-info header .tab-header button span {
|
||||
margin: auto;
|
||||
@@ -23831,13 +23855,6 @@ footer .container button.big:before {
|
||||
height: 300px;
|
||||
top: calc(50% - 200px);
|
||||
}
|
||||
.modal.save-as article label {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.modal.save-as article input {
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"env": "development",
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
"apiServerUrl": "http://seriate.steamware.net:9000/"
|
||||
},
|
||||
"allUIVisible": false
|
||||
}
|
||||
@@ -2,6 +2,6 @@
|
||||
"env": "development",
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
"apiServerUrl": "http://seriate.steamware.net:9000/"
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src="Scripts/jquery.mousewheel.js"></script>
|
||||
<script src="Scripts/jquery.signalR-2.2.2.min.js"></script>
|
||||
<script src="Scripts/raphael-2.1.4.min.js"></script>
|
||||
<script src="http://localhost:9000/signalr/hubs" async></script>
|
||||
<script src="http://seriate.steamware.net:9000/signalr/hubs" async></script>
|
||||
|
||||
<link href="assets/styles/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="setup">
|
||||
<modal type="save-as" :title="'save-as' | localize('Salva con nome')">
|
||||
<modal type="save-as" :title="'modal_title_edit_note' | localize('Modifica Note')">
|
||||
<div slot="header-buttons">
|
||||
<button class="modal-close" @click="close()">
|
||||
<i class="fa fa-remove"></i>
|
||||
@@ -8,16 +8,17 @@
|
||||
</div>
|
||||
<section>
|
||||
<article>
|
||||
<label>{{'recipe_note' | localize('Note della ricetta')}}</label>
|
||||
<label class="description_lbl">{{'modal_recipe_note' | localize('Note della ricetta')}}</label>
|
||||
<textarea
|
||||
rows="3"
|
||||
v-model="Note"
|
||||
:placeholder="'recipe_note' | localize('Note della ricetta')"
|
||||
class="notes_textarea"
|
||||
:placeholder="'modal_recipe_note' | localize('Note della ricetta')"
|
||||
/>
|
||||
</article>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn" @click="close()">{{'cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn btn-success" @click="save()">{{'confirm' | localize("Conferma")}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class SaveAs extends Vue {
|
||||
}
|
||||
|
||||
save(value: string) {
|
||||
this.deferred.resolve(this.RecipeName);
|
||||
this.deferred.resolve(this.RecipeName)
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="setup">
|
||||
<modal type="save-as" :title="'save-as' | localize('Salva con nome')">
|
||||
<modal type="save-as" :title="'modal_title_save_as' | localize('Salva Ricetta con nome')">
|
||||
<div slot="header-buttons">
|
||||
<button class="modal-close" @click="close()">
|
||||
<i class="fa fa-remove"></i>
|
||||
|
||||
@@ -130,7 +130,9 @@ export default class AppHeader extends Vue {
|
||||
}
|
||||
|
||||
async saveRecipe() {
|
||||
ModalHelper.AskConfirm('save_confirm_title', 'save_confirm_message', async () => {
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_confirm_save_recipe", "Confermi di voler sovrascrivere la ricetta?"),
|
||||
async () => {
|
||||
await recipeService.Save();
|
||||
messageService.publishToChannel('print')
|
||||
}, () => void (0))
|
||||
|
||||
@@ -146,6 +146,30 @@ export default class ModalLoadProgram extends Vue {
|
||||
this.cleanFileWatcher();
|
||||
}
|
||||
|
||||
async relaodFiles() {
|
||||
|
||||
this.selectedFile = null;
|
||||
this.selectedFileMetadata = null;
|
||||
var files = await this.getFilesForPath(this.currentPath, null);
|
||||
// controlla se impostare il currentDrive
|
||||
|
||||
|
||||
// Check destination depth
|
||||
if (this.navigationDepth == 1) {
|
||||
this.fillArray(this.firstColumnData, files);
|
||||
this.secondColumnData.splice(0, this.secondColumnData.length);
|
||||
this.currentFilterFirst = "";
|
||||
}
|
||||
|
||||
if (this.navigationDepth == 2) {
|
||||
this.fillArray(this.secondColumnData, files);
|
||||
this.currentFilterSecond = "";
|
||||
}
|
||||
|
||||
this.calcBreadCrumb(this.currentPath);
|
||||
this.cleanFileWatcher();
|
||||
}
|
||||
|
||||
fillArray(destinationArray: Array<any>, sourceArray: Array<any>) {
|
||||
destinationArray.splice(0, destinationArray.length);
|
||||
for (const key in sourceArray) {
|
||||
@@ -229,10 +253,17 @@ export default class ModalLoadProgram extends Vue {
|
||||
Name: data.name || data.Name,
|
||||
PreviewBase64: data.previewBase64 || data.PreviewBase64,
|
||||
IsJob: data.isJob || data.IsJob,
|
||||
CanEdit: data.canEdit || data.CanEdit
|
||||
CanEdit: data.canEdit || data.CanEdit,
|
||||
SheetX: data.sheetX || data.SheetX,
|
||||
SheetY: data.sheetY || data.SheetY,
|
||||
SheetZ: data.sheetZ || data.SheetZ,
|
||||
Annotation: data.annotation || data.Annotation
|
||||
} as FileInfo;
|
||||
}
|
||||
|
||||
porva(){
|
||||
return this.selectedFile.PreviewBase64.replace(/"/g, '\\"');
|
||||
}
|
||||
async fileInfo(str, isJob, fromdepth: number) {
|
||||
this.lastClickPath = str;
|
||||
if (fromdepth == 1)
|
||||
@@ -342,6 +373,36 @@ export default class ModalLoadProgram extends Vue {
|
||||
this.showZoomedImage = !this.showZoomedImage;
|
||||
}
|
||||
|
||||
duplicateprogram()
|
||||
{
|
||||
var res = cmsClient.editProgram(this.selectedFile.AbsolutePath, this.fileChanged);
|
||||
}
|
||||
|
||||
deleteprogram()
|
||||
{
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_confirm_delete_recipe", "Confermi di voler eliminare la ricetta?"),
|
||||
async () => {
|
||||
var res = cmsClient.deleteFile(this.selectedFile.AbsolutePath);
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error) {
|
||||
(iziToast as any).error({
|
||||
title: "error",
|
||||
message: obj.error,
|
||||
theme: "dark",
|
||||
timeout: 10000,
|
||||
class: "t-error",
|
||||
transitionOut: "fadeOut",
|
||||
})
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.relaodFiles();
|
||||
}
|
||||
}, () => void (0))
|
||||
|
||||
}
|
||||
|
||||
editprogram() {
|
||||
var res = cmsClient.editProgram(this.selectedFile.AbsolutePath, this.fileChanged);
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
:disabled="!isCnReady()"
|
||||
@click="navigateTo('\\\\','\\\\', false, 1,0)"
|
||||
></card-folder-path>-->
|
||||
<!-- <hr /> -->
|
||||
<!-- <hr /> --><!--
|
||||
<card-folder-path
|
||||
name="Recent"
|
||||
:iconType="'SPFO'"
|
||||
:selected="currentDrive == recentPath"
|
||||
@click="navigateTo(recentPath, recentPath, true, 1, 0)"
|
||||
></card-folder-path>
|
||||
<hr />
|
||||
<hr /> -->
|
||||
<card-folder-path
|
||||
v-for="(val, key) in this.driveList"
|
||||
:key="key"
|
||||
@@ -121,20 +121,20 @@
|
||||
<label class="text">{{getDate(selectedFile.LastModDate)}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="group-button">
|
||||
<button class="btn" v-if="false">
|
||||
<div class="group-button">
|
||||
<!--<button class="btn" @click="duplicateprogram">
|
||||
<i class="fa fa-clone"></i>
|
||||
</button>-->
|
||||
<button class="btn" :disabled="!selectedFile.CanEdit" @click="deleteprogram">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
<button class="btn" :disabled="!selectedFile.CanEdit" @click="editprogram">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
</button>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="selected-item-body" v-if="!selectedFile.IsJob" :class="{blur:fileIsChanged}">
|
||||
<div class="selected-item-body-image">
|
||||
<div v-if="selectedFile.PreviewBase64" class="container" @click="ToggleShowZoomedImage">
|
||||
<img :src="selectedFile.PreviewBase64" />
|
||||
<div v-if="selectedFile.PreviewBase64" class="container" @click="ToggleShowZoomedImage">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" v-html="selectedFile.PreviewBase64" version="1.1" width="100%" height="100%" viewBox="0 0 2000 1500"></svg>
|
||||
<div class="eye">
|
||||
<i class="fa fa-eye" aria-hidden="true"></i>
|
||||
</div>
|
||||
@@ -145,8 +145,21 @@
|
||||
>{{'modal_load_program_lbl_img_not_found' | localize('Preview non disponibile')}}</div>
|
||||
</div>
|
||||
<div class="selected-item-body-description scrollable">
|
||||
<div class="row" v-for="(item,index) in selectedFile.Content" :key="'line' + index">
|
||||
<label>{{item}}</label>
|
||||
<div class="row" >
|
||||
<label class="key">{{'modal_load_program_lbl_Sheet_X' | localize('Dimensione lastra X:')}}</label>
|
||||
<label>{{selectedFile.SheetX}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="key">{{'modal_load_program_lbl_Sheet_Y' | localize('Dimensione lastra Y:')}}</label>
|
||||
<label>{{selectedFile.SheetY}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="key">{{'modal_load_program_lbl_Sheet_Z' | localize('Spessore lastra:')}}</label>
|
||||
<label>{{selectedFile.SheetZ}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="key">{{'modal_load_program_lbl_notes' | localize('Note:')}}</label>
|
||||
<label>{{selectedFile.Annotation}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -128,22 +128,12 @@ export default class ZoomImage extends Vue {
|
||||
}
|
||||
|
||||
centerimage() {
|
||||
this.lastX = this.containerWidth / 2 - this.imageWidth / 2;
|
||||
this.lastY = this.containerHeight / 2 - this.imageHeight / 2;
|
||||
|
||||
if (this.containerWidth >= this.imageWidth && this.containerHeight >= this.imageHeight)
|
||||
this.scaleImage = 1;
|
||||
else {
|
||||
var primocalc = (this.containerWidth / this.imageWidth) - 0.01;
|
||||
var secondocalc = (this.containerHeight / this.imageHeight) - 0.01;
|
||||
if (primocalc < secondocalc)
|
||||
this.scaleImage = (Math.round(primocalc * 100) / 100) - 0.01;
|
||||
else
|
||||
this.scaleImage = (Math.round(secondocalc * 100) / 100) - 0.01;
|
||||
}
|
||||
|
||||
this.lastX = 0;
|
||||
this.lastY = 0;
|
||||
this.scaleImage = 1;
|
||||
|
||||
this.minScale = this.scaleImage;
|
||||
this.transImage = "translateX(" + this.lastX + "px)translateY(" + this.lastY + "px)scale(" + this.scaleImage + ")";
|
||||
this.transImage = "translateX(" + 0 + "px)translateY(" + 0 + "px)scale(" + this.scaleImage + ")";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
@touchstart="dw"
|
||||
@touchmove="move"
|
||||
@dblclick="zoomPlusAnimated">
|
||||
<img ref="imageChild" :style="{'transform':transImage,'transition':animation}" :src="imageSrc" v-on:load="onImageLoaded" >
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" :style="{'transform':transImage}" v-html="imageSrc" version="1.1" width="100%" height="100%" viewBox="0 0 2000 1500" v-on:load="onImageLoaded"></svg>
|
||||
</div>
|
||||
<div class="loading" v-if="!imageLoaded"><i class="fa fa-circle-o-notch fa-spin"></i></div>
|
||||
<!-- <div class="loading" v-if="!imageLoaded"><i class="fa fa-circle-o-notch fa-spin"></i></div>-->
|
||||
|
||||
<div class="btngroup_close" v-if="showBackButton">
|
||||
<button @click="close"><i class="fa fa-chevron-left" ></i></button>
|
||||
|
||||
Reference in New Issue
Block a user