[Rt-commit] rt branch, custom-css, created. rt-3.8.8-420-gde480f2
Chia-liang Kao
clkao at bestpractical.com
Tue Aug 17 08:18:39 EDT 2010
The branch, custom-css has been created
at de480f29fb735ee7aef85e6e4b305edcdb01b701 (commit)
- Log -----------------------------------------------------------------
commit de480f29fb735ee7aef85e6e4b305edcdb01b701
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Tue Aug 17 20:10:55 2010 +0800
basic dynamic css apply test.
diff --git a/share/html/Admin/Elements/SystemTabs b/share/html/Admin/Elements/SystemTabs
index cb51fb6..bbf4271 100755
--- a/share/html/Admin/Elements/SystemTabs
+++ b/share/html/Admin/Elements/SystemTabs
@@ -73,6 +73,9 @@
I => { title => loc('RT at a glance'),
path => 'Admin/Global/MyRT.html',
},
+ J => { title => loc('Theme'),
+ path => 'Admin/Global/Theme.html',
+ },
};
diff --git a/share/html/Admin/Elements/SystemTabs b/share/html/Admin/Global/Theme.html
old mode 100755
new mode 100644
similarity index 58%
copy from share/html/Admin/Elements/SystemTabs
copy to share/html/Admin/Global/Theme.html
index cb51fb6..7ec00aa
--- a/share/html/Admin/Elements/SystemTabs
+++ b/share/html/Admin/Global/Theme.html
@@ -45,55 +45,41 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Tabs, subtabs => $tabs,
- current_tab => 'Admin/Global/',
- current_subtab => $current_tab,
- Title => $Title &>
+<& /Admin/Elements/Header, Title => loc("Theme") &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/Theme.html',
+ Title => loc("Theme") &>
+<& /Elements/ListActions, actions => \@results &>
-<%INIT>
- my $tabs = {
-
- A => { title => loc('Scrips'),
- path => 'Admin/Global/Scrips.html',
- },
- B => { title => loc('Templates'),
- path => 'Admin/Global/Templates.html',
- },
-
- F => { title => loc('Custom Fields'),
- path => 'Admin/Global/CustomFields/index.html',
- },
+<style type="text/css" media="screen" id="test">
+</style>
- G => { title => loc('Group Rights'),
- path => 'Admin/Global/GroupRights.html',
- },
- H => { title => loc('User Rights'),
- path => 'Admin/Global/UserRights.html',
- },
- I => { title => loc('RT at a glance'),
- path => 'Admin/Global/MyRT.html',
- },
-};
+Csutom CSS:
+<textarea rows=30 cols=60 id="user_css">
+body {background: orange}
- # Now let callbacks add their extra tabs
- $m->callback( %ARGS, tabs => $tabs );
+div#header h1 { color:black }
- if ($current_tab) {
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs || {};
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
- }
- }
- }
-</%INIT>
+input[type="reset"], input[type="submit"], input[class="button"] {background: green}
+
+</textarea>
+
+<input id="try" type="button" value="Try">
+
+<script type="text/javascript">
+jQuery(function($) {
+ $('#try').click(function() {
+ $("style#test").text($('#user_css').val());
+ })
-
+});
+</script>
+
+<%INIT>
+my @results;
+
+</%INIT>
<%ARGS>
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
+
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list