[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-407-g8d4567c

Thomas Sibley trs at bestpractical.com
Mon Nov 8 10:06:51 EST 2010


The branch, 3.9-trunk has been updated
       via  8d4567c425f635134b7cab9645f2f6a5b2d040b0 (commit)
       via  051b52f1d929f41a99cad48cb2e0a974c1905252 (commit)
       via  0bf22a22bb364179378698bc4c51d414461492e4 (commit)
      from  2e10673df970d30dc194967ad6cde435808c2e39 (commit)

Summary of changes:
 docs/rt3-schema-relationships.dot  |   89 ------------------------------------
 share/html/Admin/Global/Theme.html |   45 +++++++++++-------
 2 files changed, 28 insertions(+), 106 deletions(-)
 mode change 100755 => 100644 docs/Security
 delete mode 100755 docs/rt3-schema-relationships.dot

- Log -----------------------------------------------------------------
commit 0bf22a22bb364179378698bc4c51d414461492e4
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Nov 5 10:24:32 2010 -0400

    This hasn't been updated since 2005

diff --git a/docs/rt3-schema-relationships.dot b/docs/rt3-schema-relationships.dot
deleted file mode 100755
index e290f8b..0000000
--- a/docs/rt3-schema-relationships.dot
+++ /dev/null
@@ -1,89 +0,0 @@
-digraph g {
-graph [
-rankdir = "RL",
- concentrate = true,
-ratio = auto
-];
-node [
-fontsize = "18",
-shape = record, fontsize = 18
-];
-edge [
-];
-
-"Records" [shape = record, fontsize = 18, label = "(Any RT::Record)" ];
-"Records" -> "Principals" [label = "Creator -> id"];
-"ACL" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"ACL" -> "Principals" [label="PrincipalId -> id"];
-"ACL" -> "Principals" [label="DelegatedBy -> id"];
-"ACL" -> "ACL" [label="DelegatedFrom -> id"];
-
-"Attachments" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Attachments" -> "Transactions" [label="TransactionId -> id"];
-"Attachments" -> "Attachments" [label="Parent -> id"];
-
-"CachedGroupMemers" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"CachedGroupMemers" -> "Groups" [label="GroupId -> id", weight=2];
-"CachedGroupMemers" -> "Principals" [label="MemberId -> id"];
-"CachedGroupMemers" -> "CachedGroupMemers" [label="Via -> id"];
-"CachedGroupMemers" -> "Groups" [label="ImmediateParentId -> id"];
-
-"CustomFields" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"CustomFieldValues" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"CustomFieldValues" -> "CustomFields" [label="CustomField -> id"];
-
-"GroupMembers" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"GroupMembers" -> "Groups" [label="GroupId -> id", weight=2];
-"GroupMembers" -> "Principals" [label="MemberId -> id", weight = 2];
-
-"Groups" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Groups" -> "Principals" [label="Groups.id -> id"];
-
-"Links" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Links" -> "Tickets" [label="LocalBase => id (usually)", style="dotted"];
-"Links" -> "Tickets" [label="LocalTarget => id (usually)", style="dotted"];
-
-"Principals" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"Attributes" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Attributes" -> "Records" [label="ObjectId -> id"];
-
-"Queues" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"ScripActions" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"ScripConditions" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"Scrips" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Scrips" -> "ScripConditions" [label="ScripCondition -> id"];
-"Scrips" -> "ScripActions" [label="ScripAction -> id"];
-"Scrips" -> "Templates" [label="Template -> id"];
-"Scrips" -> "Queues" [label="Queue -> id"];
-
-"Templates" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Templates" -> "Queues" [label ="Queue -> id" ];
-
-"ObjectCustomFields" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"ObjectCustomFields" -> "CustomFields" [label="CustomField -> id"];
-"ObjectCustomFields" -> "Records" [label="ObjectId -> id"];
-
-"ObjectCustomFieldValues" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"ObjectCustomFieldValues" -> "CustomFields" [label="CustomField -> id"];
-"ObjectCustomFieldValues" -> "Records" [label="ObjectId -> id"];
-
-"Tickets" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Tickets" -> "Tickets" [label="EffectiveId -> id"];
-"Tickets" -> "Principals" [label="Owner -> id"];
-"Queues" -> "Tickets" [style="invis"];
-"Tickets" -> "Queues" [label="Queue -> id"];
-
-"Transactions" [shape = record, fontsize = 18, label = "<col0> \N " ];
-"Transactions" -> "Records" [label="ObjectId -> id"];
-
-"Users" [shape = record, fontsize = 18, label = "<col0> \N " ];
-
-"Users" -> "Principals" [label="id -> id"];
-
-
-}

commit 051b52f1d929f41a99cad48cb2e0a974c1905252
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Nov 5 10:25:34 2010 -0400

    Doc doesn't need an execution bit

diff --git a/docs/Security b/docs/Security
old mode 100755
new mode 100644

commit 8d4567c425f635134b7cab9645f2f6a5b2d040b0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Nov 5 18:12:58 2010 -0400

    Fix the theme editor for the new menus
    
    Currently this doesn't quite work 100% flawlessly with the web2 theme.
    Styling the "Header" section when using web2 also affects the main left
    nav.

diff --git a/share/html/Admin/Global/Theme.html b/share/html/Admin/Global/Theme.html
index c3894c1..c0066ce 100644
--- a/share/html/Admin/Global/Theme.html
+++ b/share/html/Admin/Global/Theme.html
@@ -53,7 +53,7 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/farbtastic.js"></script>
-<style type="text/css" media="screen" id="test"></style>
+<style type="text/css" id="test"></style>
 
 <div id="simple-customize">
 <div id="upload-logo">
@@ -109,11 +109,11 @@
 
 <script type="text/javascript">
 var section_css_mapping = {
-    'Page': ['body', 'input[type="reset"], input[type="submit"], input[class="button"]'],
-    'Header': ['div#quickbar'],
+    'Page': ['body'],
+    'Header': ['div#quickbar', '#main-navigation #app-nav > li', '#main-navigation #app-nav > li > a'],
+    'Page title': ['div#header h1'],
     'Page content': ['div#body'],
-    'Navigation': ['div#nav'],
-    'Page menu': ['div#page-navigation ul#page-menu'],
+    'Buttons': ['input[type="reset"], input[type="submit"], input[class="button"]'],
 };
 
 jQuery(function($) {
@@ -139,8 +139,12 @@ jQuery(function($) {
       var applying = section_css_mapping[section];
       var css = $('#user_css').val();
       if (applying) {
+          var specials = new RegExp("([.*+?|()\\[\\]{}\\\\])", "g");
           for (var name in applying) {
-              var rule = new RegExp('\\b'+applying[name]+'\\s*{.*?}');
+              var selector = (applying[name]).replace(specials, "\\$1");
+              //var rule = new RegExp('\\b'+selector+'\\s*\{.*?\}');
+              var rule = new RegExp('^'+selector+'\\s*\{.*?\}', "m");
+              console.log(rule);
               var newcss = "background: " + bg;
 
               /* Don't set the text color on <body> as it affects too much */
@@ -151,7 +155,16 @@ jQuery(function($) {
               if (applying[name].match(/quickbar/))
                   newcss += "; border: none;"
 
-              css = css.replace(rule, applying[name]+" { "+newcss+" } ");
+              /* Page title's text color is the selected color */
+              if (applying[name].match(/#header/))
+                  newcss = "color: " + bg;
+
+              /* Navigation wants border color too */
+              if (applying[name].match(/#app-nav > li > a/))
+                  newcss += "; border-color: " + fg;
+
+              //css = css.replace(rule, applying[name]+" { "+newcss+" }");
+              css = css.replace(rule, applying[name]+" { "+newcss+" }");
           }
       }
       $('#user_css').val(css);
@@ -223,22 +236,20 @@ if (!$user_css) {
     my $attr = $RT::System->FirstAttribute('UserCSS');
     $user_css = $attr ? $attr->Content : '/* Page */
 body {}
-input[type="reset"], input[type="submit"], input[class="button"] {}
 
-/* Page content */
-div#body {}
+/* Header */
+div#quickbar {}
+#main-navigation #app-nav > li {}
+#main-navigation #app-nav > li > a {}
 
 /* Page title */
 div#header h1 {}
 
-/* Header */
-div#quickbar {}
-
-/* Navigation */
-div#nav {}
+/* Page content */
+div#body {}
 
-/* Page menu */
-div#page-navigation ul#page-menu {}
+/* Buttons */
+input[type="reset"], input[type="submit"], input[class="button"] {}
 ';
 
 }

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


More information about the Rt-commit mailing list