From 32ac2696f66deab3b66c61632861a1948c983398 Mon Sep 17 00:00:00 2001 From: frisi Date: Fri, 10 Apr 2015 01:18:55 +0200 Subject: [PATCH] [fc] Repository: archetypes.referencebrowserwidget Branch: refs/heads/master Date: 2015-02-27T11:01:23+01:00 Author: Dimitar Dimitrov (mitakas) Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/e768e0fde5dd10cea7a6d884ae81c21d764f76fa Add a label in the popup widget for the image preview. Files changed: M src/archetypes/referencebrowserwidget/browser/popup.pt Repository: archetypes.referencebrowserwidget Branch: refs/heads/master Date: 2015-02-27T11:01:23+01:00 Author: Dimitar Dimitrov (mitakas) Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/1a6d8b8bbd5dbcc9f96bb1c731971ee72ab3a232 Show the image even if it can't be referenced. Files changed: M src/archetypes/referencebrowserwidget/browser/popup.pt Repository: archetypes.referencebrowserwidget Branch: refs/heads/master Date: 2015-02-27T11:04:31+01:00 Author: Dimitar Dimitrov (mitakas) Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/0fa31145d519604d58116c3cb901324425e278ec Update changelog. Files changed: M docs/CHANGES.txt Repository: archetypes.referencebrowserwidget Branch: refs/heads/master Date: 2015-04-10T01:18:55+02:00 Author: Harald Friessnegger (frisi) Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/a4f8e57bf30fdd4d41480278d5a3db1a2f20fd95 Merge pull request #17 from mitakas/image_preview_label Add a label in the popup widget for the image preview. Files changed: M docs/CHANGES.txt M src/archetypes/referencebrowserwidget/browser/popup.pt --- last_commit.txt | 426 +++++++++++++----------------------------------- 1 file changed, 113 insertions(+), 313 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 3634690a93..974e161724 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,334 +1,134 @@ -Repository: mockup +Repository: archetypes.referencebrowserwidget Branch: refs/heads/master -Date: 2015-04-09T15:19:22-05:00 -Author: Sam Schwartz (obct537) -Commit: https://github.com/plone/mockup/commit/1703e4432c41c7779ae6c3f9dc13083390411ff7 +Date: 2015-02-27T11:01:23+01:00 +Author: Dimitar Dimitrov (mitakas) +Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/e768e0fde5dd10cea7a6d884ae81c21d764f76fa -Fix #477 Fix #472 Restyled the theme mapper page, fixed referenced JS issues +Add a label in the popup widget for the image preview. Files changed: -M mockup/patterns/filemanager/pattern.js -M mockup/patterns/thememapper/pattern.js -M mockup/patterns/thememapper/pattern.thememapper.less +M src/archetypes/referencebrowserwidget/browser/popup.pt -diff --git a/mockup/patterns/filemanager/pattern.js b/mockup/patterns/filemanager/pattern.js -index 4b4ad63..33a9911 100644 ---- a/mockup/patterns/filemanager/pattern.js -+++ b/mockup/patterns/filemanager/pattern.js -@@ -346,12 +346,23 @@ define([ - if (self.ace !== undefined){ - self.ace.editor.destroy(); - } -- self.ace = new TextEditor(self.$editor, { -- width: self.$editor.width() -- }); -- self.ace.setSyntax(path); -- self.ace.setText(self.fileData[path].contents); -- self.ace.editor.clearSelection(); -+ self.ace = new TextEditor(self.$editor); -+ -+ self.resizeEditor(); -+ -+ if( typeof self.fileData[path].info !== 'undefined' ) -+ { -+ var preview = self.fileData[path].info; -+ self.ace.editor.off(); -+ $('.ace_editor').empty().append(preview); -+ } -+ else -+ { -+ self.ace.setText(self.fileData[path].contents); -+ self.ace.setSyntax(path); -+ self.ace.editor.clearSelection(); -+ } -+ - self.ace.editor.on('change', function() { - if (self.ace.editor.curOp && self.ace.editor.curOp.command.name) { - $('[data-path="'+path+'"]').addClass("modified"); -@@ -396,8 +407,25 @@ define([ - node = node.parent; - } - return '/' + parts.join('/'); -- } -+ }, -+ -+ resizeEditor: function() { -+ var self = this; -+ var tabBox = self.$tabs.parent(); -+ -+ //Contains both the tabs, and editor window -+ var container = tabBox.parent().parent(); -+ var h = container.innerHeight(); -+ h -= tabBox.outerHeight(); +diff --git a/src/archetypes/referencebrowserwidget/browser/popup.pt b/src/archetypes/referencebrowserwidget/browser/popup.pt +index c7cae56..56dcede 100644 +--- a/src/archetypes/referencebrowserwidget/browser/popup.pt ++++ b/src/archetypes/referencebrowserwidget/browser/popup.pt +@@ -192,9 +192,12 @@ + -+ //accounts for the borders/margin -+ self.$editor.height(h); -+ -+ var w = container.innerWidth(); -+ w -= (container.outerWidth(true) - container.innerWidth()); -+ -+ self.$editor.width(w); -+ } - }); - - return FileManager; -diff --git a/mockup/patterns/thememapper/pattern.js b/mockup/patterns/thememapper/pattern.js -index 6dfe6f0..e7c1c83 100644 ---- a/mockup/patterns/thememapper/pattern.js -+++ b/mockup/patterns/thememapper/pattern.js -@@ -481,7 +481,7 @@ define([ - self.showInspectorsButton.applyTemplate(); - $('html, body').animate({ - scrollTop: $parent.offset().top - 50 -- }, 1000); -+ }, 1000); - }, - hideInspectors: function(){ - var self = this; -diff --git a/mockup/patterns/thememapper/pattern.thememapper.less b/mockup/patterns/thememapper/pattern.thememapper.less -index afc08b4..f25ff8b 100644 ---- a/mockup/patterns/thememapper/pattern.thememapper.less -+++ b/mockup/patterns/thememapper/pattern.thememapper.less -@@ -4,7 +4,7 @@ - - .pat-thememapper{ - font-family: Roboto, sans-serif; -- -+ - iframe{ - width: 100%; - height: 300px; -@@ -18,6 +18,7 @@ - - .mockup-inspector { - clear: both; -+ padding: 10px 0 10px 0; - } + +- ++ + + + +Commit: https://github.com/plone/archetypes.referencebrowserwidget/commit/1a6d8b8bbd5dbcc9f96bb1c731971ee72ab3a232 + +Show the image even if it can't be referenced. + +Files changed: +M src/archetypes/referencebrowserwidget/browser/popup.pt + +diff --git a/src/archetypes/referencebrowserwidget/browser/popup.pt b/src/archetypes/referencebrowserwidget/browser/popup.pt +index 56dcede..7063ff1 100644 +--- a/src/archetypes/referencebrowserwidget/browser/popup.pt ++++ b/src/archetypes/referencebrowserwidget/browser/popup.pt +@@ -192,7 +192,7 @@ + - .fullscreen { -@@ -92,4 +93,53 @@ - } - } + +-