[Bps-public-commit] RTx-TakeScreenshots branch, master, updated. 07fa7ebafe882bd28697784b61be1238aca1197f

Thomas Sibley trs at bestpractical.com
Tue Apr 26 12:56:15 EDT 2011


The branch, master has been updated
       via  07fa7ebafe882bd28697784b61be1238aca1197f (commit)
      from  62b2ea75ccf5a2a26b697dbb508837858eb9a88f (commit)

Summary of changes:
 bin/take-screenshots |   46 +++++++++++++++++++++++++++++++++++++++++++++-
 etc/example-logo.png |  Bin 0 -> 7717 bytes
 etc/example.css      |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 79 insertions(+), 1 deletions(-)
 create mode 100644 etc/example-logo.png
 create mode 100644 etc/example.css

- Log -----------------------------------------------------------------
commit 07fa7ebafe882bd28697784b61be1238aca1197f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Apr 26 12:55:58 2011 -0400

    Take screenshots of the theme editor with example branding

diff --git a/bin/take-screenshots b/bin/take-screenshots
index bcb1bcb..e9d4270 100755
--- a/bin/take-screenshots
+++ b/bin/take-screenshots
@@ -70,6 +70,37 @@ for my $subscribe (grep { $_->[1] =~ /Dashboards\/Subscription/ } @pages) {
     $firefox->capture_entire_page_screenshot("$output/ticket_create.png");
 }
 
+# Set up an example Hiveminder branding :)
+{
+    $firefox->open("$RT/Admin/Tools/Theme.html");
+    $firefox->attach_file('logo-upload', 'file://' . etc('example-logo.png'));
+    # the Upload button doesn't have a name or ID
+    $firefox->click('css=input[value="Upload"]');
+    $firefox->wait_for_page_to_load(1000);
+
+    $firefox->select('section', 'Page');
+    $firefox->click('css=.primary-colors button:nth-of-type(1)');
+    
+    $firefox->select('section', 'Page title');
+    $firefox->run_script('jQuery.farbtastic("#color-picker").setColor("#000000");');
+
+    print "Screenshotting theme/brand editor\n";
+    $firefox->capture_entire_page_screenshot("$output/theme_editor.png");
+
+    $firefox->type('user_css', advanced_css());
+    $firefox->click('try');
+    $firefox->pause(1000);
+
+    print "Screenshotting theme/brand editor, advanced\n";
+    $firefox->capture_entire_page_screenshot("$output/theme_editor_advanced.png");
+
+    # reset it all
+    for my $button (qw(reset_css reset_logo)) {
+        $firefox->click($button);
+        $firefox->wait_for_page_to_load(1000);
+    }
+}
+
 my $resized = 0;
 
 # Capture the pages we want
@@ -96,17 +127,30 @@ sub resize_window {
     $window->pause(1000);
 }
 
+sub etc {
+    file($0)->dir->parent->subdir('etc')->file(shift)->absolute;
+}
+
+sub advanced_css {
+    local $/;
+    open my $fh, '<', etc('example.css') or return;
+    my $css = <$fh>;
+    close $fh;
+    return $css;
+}
+
 __DATA__
 homepage|/index.html
 ticket_basics|/Ticket/Display.html?id=1
 ticket_history|/Ticket/History.html?id=1
+# Ticket create is special-cased above
 search_results|/Search/Results.html?Query=id+<+4;Order=DESC
 search_bulk_update|/Search/Bulk.html?Query=id+<+4;Order=DESC
 ticket_relationships|/Ticket/Graphs/index.html?id=1&Direction=LR&LeadingLink=DependsOn&MaxDepth=0&ShowLinks=MemberOf&ShowLinks=RefersTo&FillUsing=&Level-1-Properties=Subject&Level-1-Properties=Status&Level-2-Properties=Subject&Level-2-Properties=Status&Level-3-Properties=Subject&Level-3-Properties=Status&Update=Update+Graph&SavedSearchId=new&SavedSearchOwner=RT::User-12&SavedSearchDescription=&SavedSearchLoad=
 ticket_charts|/Search/Chart.html?Query=Created+%3C+%27tomorrow%27&SavedChartSearchId=new&ChartStyle=bar&PrimaryGroupBy=Owner.Name
 dashboard|/Dashboards/10/SLA+Performance
 dashboard_subscription|/Dashboards/Subscription.html?id=10
-theme_editor|/Admin/Tools/Theme.html
+# Theme editor is special-cased above
 # acl-User_Defined-22 is the Best Practical staff group
 admin_rights_editor|/Admin/Global/GroupRights.html#acl-User_Groups-22
 # Once we hit a mobile page, we resize to a smaller window.  Only mobile pages
diff --git a/etc/example-logo.png b/etc/example-logo.png
new file mode 100644
index 0000000..b81eece
Binary files /dev/null and b/etc/example-logo.png differ
diff --git a/etc/example.css b/etc/example.css
new file mode 100644
index 0000000..5bad42c
--- /dev/null
+++ b/etc/example.css
@@ -0,0 +1,34 @@
+/* Page */
+body { background: #f6f6f6; }
+
+/* Header */
+div#quickbar { background: #fedc91 url(http://hiveminder.com/static/images/nav.gradient.png) repeat-x left bottom; color: black; border: none; }
+body.aileron #main-navigation #app-nav > li, body.aileron #main-navigation #app-nav > li > a, #prefs-menu > li, #prefs-menu > li > a, #logo .rtname { color: black }
+
+/* Page title */
+div#header h1 { color: #000000 }
+
+/* Page content */
+div#body { border: 1px solid #aaa }
+
+/* Buttons */
+input[type="reset"], input[type="submit"], input[class="button"] {
+    border: 1px solid #EA3;
+    border-right: 1px solid #D92;
+    border-bottom: 1px solid #D92;
+    background-color: #FB5;
+    color: black;
+    font-weight: bold;
+}
+
+div#body input[type="reset"], div#body input[type="submit"], div#body input[class="button"], div#body button { font-size: 0.9em; }
+
+/* Button hover */
+input[type="reset"]:hover, input[type="submit"]:hover, input[class="button"]:hover {
+    border: 1px solid #EA3;
+    border-right: 1px solid #D92;
+    border-bottom: 1px solid #D92;
+    background-color: #ea3;
+    color: black;
+    font-weight: bold;
+}

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list