diff --git a/build.bat b/build.bat index 5a92ca26..96a2ce4c 100644 --- a/build.bat +++ b/build.bat @@ -55,12 +55,4 @@ robocopy /e /NFL /NDL /NJH domain\onboard\*.json edition\static\onboard echo "Compiling Windows" set GOOS=windows -go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-windows-amd64.exe edition/community.go - -echo "Compiling Linux" -set GOOS=linux -go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-linux-amd64 edition/community.go - -echo "Compiling Darwin" -set GOOS=darwin -go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-darwin-amd64 edition/community.go +go build -mod=vendor -trimpath -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-windows-amd64.exe edition/community.go diff --git a/domain/conversion/conversion.go b/domain/conversion/conversion.go index 0a0cae75..fa87522f 100644 --- a/domain/conversion/conversion.go +++ b/domain/conversion/conversion.go @@ -176,6 +176,7 @@ func processDocument(ctx domain.RequestContext, r *env.Runtime, store *store.Sto document.UserID = ctx.UserID documentID := uniqueid.Generate() document.RefID = documentID + document.Sequence = doc.Unsequenced if r.Product.Edition == domain.CommunityEdition { document.Lifecycle = workflow.LifecycleLive diff --git a/domain/document/document.go b/domain/document/document.go index 878b3aa8..de77a9cc 100644 --- a/domain/document/document.go +++ b/domain/document/document.go @@ -66,6 +66,8 @@ func FilterCategoryProtected(docs []doc.Document, cats []category.Category, memb // CopyDocument clones an existing document func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (newDocumentID string, err error) { + unseq := doc.Unsequenced + doc, err := s.Document.Get(ctx, documentID) if err != nil { err = errors.Wrap(err, "unable to fetch existing document") @@ -79,6 +81,7 @@ func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) ( doc.VersionID = "" doc.GroupID = "" doc.Template = false + doc.Sequence = unseq // Duplicate pages and associated meta pages, err := s.Page.GetPages(ctx, documentID) diff --git a/domain/template/endpoint.go b/domain/template/endpoint.go index c8033c05..0f173667 100644 --- a/domain/template/endpoint.go +++ b/domain/template/endpoint.go @@ -93,6 +93,7 @@ func (h *Handler) SavedList(w http.ResponseWriter, r *http.Request) { func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) { method := "template.saved" ctx := domain.GetRequestContext(r) + unseq := doc.Unsequenced if !h.Runtime.Product.IsValid(ctx) { response.WriteBadLicense(w) @@ -149,6 +150,7 @@ func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) { doc.ID = 0 doc.Template = true doc.Lifecycle = workflow.LifecycleLive + doc.Sequence = unseq // Duplicate pages and associated meta pages, err := h.Store.Page.GetPages(ctx, model.DocumentID) @@ -342,6 +344,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) { d.SpaceID = spaceID d.UserID = ctx.UserID d.Name = docTitle + d.Sequence = doc.Unsequenced if h.Runtime.Product.Edition == domain.CommunityEdition { d.Lifecycle = workflow.LifecycleLive diff --git a/gui/app/components/document/sidebar-attachment.js b/gui/app/components/document/sidebar-attachment.js index fd792f08..f5acad70 100644 --- a/gui/app/components/document/sidebar-attachment.js +++ b/gui/app/components/document/sidebar-attachment.js @@ -65,6 +65,7 @@ export default Component.extend(Modals, Notifier, { // Handle upload clicks on button and anything inside that button. // But only if user can edit this document. if (!this.get('canEdit')) return; + let uploaded = this.i18n.localize('uploaded'); let sel = ['#upload-document-files ', '#upload-document-files > i']; for (var i=0; i < 2; i++) { @@ -87,7 +88,7 @@ export default Component.extend(Modals, Notifier, { }); this.on("queuecomplete", function () { - self.notifySuccess(this.i18n.localize('uploaded')); + self.notifySuccess(uploaded); self.getAttachments(); }); diff --git a/gui/app/components/ui/ui-toolbar-label.js b/gui/app/components/ui/ui-toolbar-label.js index f369ce9c..d143491a 100644 --- a/gui/app/components/ui/ui-toolbar-label.js +++ b/gui/app/components/ui/ui-toolbar-label.js @@ -24,6 +24,10 @@ export default Component.extend({ selected: false, ariaRole: "button", tabindex: 0, + attributeBindings: ['title'], + title: computed('tooltip', function() { + return this.tooltip; + }), calcClass: computed('selected', function() { let c = ''; diff --git a/gui/app/templates/components/document/content-linker.hbs b/gui/app/templates/components/document/content-linker.hbs index 65dbee6b..cb915951 100644 --- a/gui/app/templates/components/document/content-linker.hbs +++ b/gui/app/templates/components/document/content-linker.hbs @@ -1,7 +1,7 @@