From 2a77bd2c9281eeeb5500a589dc0dd438d141b291 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 15 Apr 2015 18:39:05 -0400 Subject: [PATCH] - UI improvements in prep for adding undo ability - Move the tag history into its own directive and clean up the code --- .../directives/repo-view/repo-panel-tags.css | 127 -------------- static/css/directives/ui/repo-tag-history.css | 131 +++++++++++++++ static/directives/repo-tag-history.html | 45 +++++ .../directives/repo-view/repo-panel-tags.html | 54 +----- .../directives/repo-view/repo-panel-tags.js | 135 +-------------- static/js/directives/ui/repo-tag-history.js | 155 ++++++++++++++++++ 6 files changed, 335 insertions(+), 312 deletions(-) create mode 100644 static/css/directives/ui/repo-tag-history.css create mode 100644 static/directives/repo-tag-history.html create mode 100644 static/js/directives/ui/repo-tag-history.js diff --git a/static/css/directives/repo-view/repo-panel-tags.css b/static/css/directives/repo-view/repo-panel-tags.css index 1a81a5604..9df9c2679 100644 --- a/static/css/directives/repo-view/repo-panel-tags.css +++ b/static/css/directives/repo-view/repo-panel-tags.css @@ -68,131 +68,4 @@ .repo-panel-tags-element .options-col .fa-download { color: #999; cursor: pointer; -} - -.repo-panel-tags-element .history-list { - margin: 10px; - border-left: 2px solid #eee; -} - -.repo-panel-tags-element .history-entry { - position:relative; - margin-top: 20px; - padding-left: 26px; - - transition: all 350ms ease-in-out; -} - -.repo-panel-tags-element .history-entry .history-text { - transition: transform 350ms ease-in-out, opacity 350ms ease-in-out; - overflow: hidden; - height: 40px; -} - -.repo-panel-tags-element .history-entry.filtered-mismatch { - margin-top: 10px; -} - -.repo-panel-tags-element .history-entry.filtered-mismatch .history-text { - height: 18px; - opacity: 0; -} - -.repo-panel-tags-element .history-entry.filtered-mismatch .history-icon { - opacity: 0.5; - transform: scale(0.5, 0.5); -} - -.repo-panel-tags-element .history-entry .history-date-break { - font-size: 16px; -} - -.repo-panel-tags-element .history-entry .history-date-break:before { - content: ""; - position: absolute; - border-radius: 50%; - width: 12px; - height: 12px; - background: #ccc; - top: 4px; - left: -7px; -} - -.repo-panel-tags-element .history-entry .history-icon { - border-radius: 50%; - width: 32px; - height: 32px; - line-height: 33px; - text-align: center; - font-size: 20px; - color: white; - background: #ccc; - - position: absolute; - left: -17px; - top: -4px; - display: inline-block; - - transition: all 350ms ease-in-out; -} - -.repo-panel-tags-element .history-entry.move .history-icon:before { - content: "\f061"; - font-family: FontAwesome; -} - -.repo-panel-tags-element .history-entry.create .history-icon:before { - content: "\f02b"; - font-family: FontAwesome; -} - -.repo-panel-tags-element .history-entry.delete .history-icon:before { - content: "\f014"; - font-family: FontAwesome; -} - -.repo-panel-tags-element .history-entry.move .history-icon { - background-color: #1f77b4; -} - -.repo-panel-tags-element .history-entry.create .history-icon { - background-color: #98df8a; -} - -.repo-panel-tags-element .history-entry.delete .history-icon { - background-color: #ff9896; -} - -.repo-panel-tags-element .history-entry .history-icon .fa-tag { - margin-right: 0px; -} - -.repo-panel-tags-element .history-entry .tag-span { - display: inline-block; - border-radius: 4px; - padding: 2px; - background: #eee; - padding-right: 6px; - color: black; - cursor: pointer; -} - -.repo-panel-tags-element .history-entry .tag-span.checked { - background: #F6FCFF; -} - -.repo-panel-tags-element .history-entry .tag-span:before { - content: "\f02b"; - font-family: FontAwesome; - margin-left: 4px; - margin-right: 4px; -} - -.repo-panel-tags-element .history-entry .history-description { - color: #777; -} - -.repo-panel-tags-element .history-entry .history-datetime { - font-size: 12px; - color: #ccc; } \ No newline at end of file diff --git a/static/css/directives/ui/repo-tag-history.css b/static/css/directives/ui/repo-tag-history.css new file mode 100644 index 000000000..7ee39b7bc --- /dev/null +++ b/static/css/directives/ui/repo-tag-history.css @@ -0,0 +1,131 @@ +.repo-tag-history-element .history-list { + margin: 10px; + border-left: 2px solid #eee; + margin-right: 150px; +} + +.repo-tag-history-element .history-entry { + position:relative; + margin-top: 20px; + padding-left: 26px; + + transition: all 350ms ease-in-out; +} + +.repo-tag-history-element .history-entry .history-text { + transition: transform 350ms ease-in-out, opacity 350ms ease-in-out; + overflow: hidden; + height: 40px; +} + +.repo-tag-history-element .history-entry.filtered-mismatch { + margin-top: 10px; +} + +.repo-tag-history-element .history-entry.filtered-mismatch .history-text { + height: 18px; + opacity: 0; +} + +.repo-tag-history-element .history-entry.filtered-mismatch .history-icon { + opacity: 0.5; + transform: scale(0.5, 0.5); +} + +.repo-tag-history-element .history-entry.filtered-mismatch.current .history-icon { + background-color: #ccc !important; +} + +.repo-tag-history-element .history-entry .history-date-break { + font-size: 16px; +} + +.repo-tag-history-element .history-entry .history-date-break:before { + content: ""; + position: absolute; + border-radius: 50%; + width: 12px; + height: 12px; + background: #ccc; + top: 4px; + left: -7px; +} + +.repo-tag-history-element .history-entry .history-icon { + position: absolute; + left: -17px; + top: -4px; + + border-radius: 50%; + width: 32px; + height: 32px; + line-height: 32px; + text-align: center; + font-size: 20px; + color: white; + background: #ccc; + + display: inline-block; + transition: all 350ms ease-in-out; +} + +.repo-tag-history-element .history-entry.move .history-icon:before { + content: "\f061"; + font-family: FontAwesome; +} + +.repo-tag-history-element .history-entry.create .history-icon:before { + content: "\f02b"; + font-family: FontAwesome; +} + +.repo-tag-history-element .history-entry.delete .history-icon:before { + content: "\f014"; + font-family: FontAwesome; +} + +.repo-tag-history-element .history-entry.current.move .history-icon { + background-color: #77BFF0; +} + +.repo-tag-history-element .history-entry.current.create .history-icon { + background-color: #98df8a; +} + +.repo-tag-history-element .history-entry.current.delete .history-icon { + background-color: #ff9896; +} + +.repo-tag-history-element .history-entry .history-icon .fa-tag { + margin-right: 0px; +} + +.repo-tag-history-element .history-entry .tag-span { + display: inline-block; + border-radius: 4px; + padding: 2px; + background: #eee; + padding-right: 6px; + color: black; + cursor: pointer; +} + +.repo-tag-history-element .history-entry .tag-span.checked { + background: #F6FCFF; +} + +.repo-tag-history-element .history-entry .tag-span:before { + content: "\f02b"; + font-family: FontAwesome; + margin-left: 4px; + margin-right: 4px; +} + +.repo-tag-history-element .history-entry .history-description { + color: #777; +} + +.repo-tag-history-element .history-entry .history-datetime { + font-size: 12px; + color: #ccc; +} \ No newline at end of file diff --git a/static/directives/repo-tag-history.html b/static/directives/repo-tag-history.html new file mode 100644 index 000000000..73bd1c6b2 --- /dev/null +++ b/static/directives/repo-tag-history.html @@ -0,0 +1,45 @@ +
+
+ + + + + +
+
+
This repository is empty.
+
Push a tag or initiate a build to populate this repository.
+
+ +
+
+ {{ entry.date | amDateFormat:'dddd, MMMM Do YYYY' }} +
+
+
+
+
+ {{ entry.tag_name }} + + + was created pointing to image + + + was deleted + + + was moved to image + + from image + + + +
+
{{ entry.time | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}
+
+
+
+
+
\ No newline at end of file diff --git a/static/directives/repo-view/repo-panel-tags.html b/static/directives/repo-view/repo-panel-tags.html index 13f82ed80..9454d8f4e 100644 --- a/static/directives/repo-view/repo-panel-tags.html +++ b/static/directives/repo-view/repo-panel-tags.html @@ -1,5 +1,5 @@
-
+