[geeklog-cvs] geeklog: Denim: because function Com_createHTMLDocument is adopt...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Apr 23 21:18:33 EDT 2012


changeset 8619:d573ad9eb1e0
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d573ad9eb1e0
user: dengen
date: Tue Apr 24 10:17:06 2012 +0900
description:
Denim: because function Com_createHTMLDocument is adopted, flag 'js_off' or 'js_on' is no longer needed.

diffstat:

 public_html/layout/denim/javascript/script.js |   59 ++----
 public_html/layout/denim/style.css            |  211 +++++++++++--------------
 public_html/layout/denim/style_rtl.css        |  211 +++++++++++--------------
 3 files changed, 204 insertions(+), 277 deletions(-)

diffs (truncated from 916 to 300 lines):

diff -r 09e0cac50959 -r d573ad9eb1e0 public_html/layout/denim/javascript/script.js
--- a/public_html/layout/denim/javascript/script.js	Tue Apr 24 08:06:12 2012 +0900
+++ b/public_html/layout/denim/javascript/script.js	Tue Apr 24 10:17:06 2012 +0900
@@ -1,48 +1,37 @@
-function FixHTML( leftblocksID, centerblocksID, rightblocksID ) {
+function FixHTML(leftblocksID, centerblocksID, rightblocksID) {
     var ua = navigator.userAgent.toLowerCase();
-    var is_old_ie = (ua.indexOf("msie") != -1) && (ua.indexOf("msie 8") == -1) && (ua.indexOf("msie 9") == -1) && (ua.indexOf("opera") == -1);
+    var is_old_ie = (ua.indexOf("msie") != -1) && (ua.indexOf("msie 8") == -1) &&
+                    (ua.indexOf("msie 9") == -1) && (ua.indexOf("opera") == -1);
+    // Set class attribute name
+    // 'class'     for Gecko, Opera, Safari, IE9 and other
+    // 'className' for IE8, IE7, IE6
+    var classattr = (is_old_ie) ? 'className' : 'class';
+
+    if (document.body.getAttribute(classattr) != '') return;
+
+    var leftblocks   = document.getElementById(leftblocksID);
+    var centerblocks = document.getElementById(centerblocksID);
+    var rightblocks  = document.getElementById(rightblocksID);
+
+    // Check HTML id attribute
+    var classValue = 'left-center-right';
+    if (leftblocks  && centerblocks && !rightblocks) classValue = 'left-center';
+    if (!leftblocks && centerblocks && rightblocks ) classValue = 'center-right';
+    if (!leftblocks && centerblocks && !rightblocks) classValue = 'center';
     
-    var leftblocks = document.getElementById(leftblocksID);
-    var centerblocks = document.getElementById(centerblocksID);
-    var rightblocks = document.getElementById(rightblocksID);
-
-    if ( document.body.getAttribute('class') == '' || !document.body.getAttribute('className') == '' ) {
-        var classValue = 'left-center-right';
-        
-        /* Check HTML id attribute. */
-        if ( leftblocks && centerblocks && !rightblocks ) classValue = 'left-center';
-        if ( !leftblocks && centerblocks && rightblocks ) classValue = 'center-right';
-        if ( !leftblocks && centerblocks && !rightblocks ) classValue = 'center';
-        
-        /* Set js_on to body class attribute  */
-        classValue += ' js_on';
-        
-        /* Set body class attribute by HTML structure. */
-        if ( is_old_ie ) {  /* IE8, IE7, IE6 */
-            document.body.setAttribute('className', classValue);
-        } else {  /* Gecko, Opera, Safari, IE9 and other */
-            document.body.setAttribute('class', classValue);
-        }
-    }
+    // Set body class attribute by HTML structure
+    document.body.setAttribute(classattr, classValue);
 }
 
 function delconfirm() {
-  if ( confirm("Delete this?") ) {
-    return true;
-  } else {
-    return false;
-  }
+  return (confirm("Delete this?")) ? true : false;
 }
 
 function postconfirm() {
-  if ( confirm("Send this?") ) {
-    return true;
-  } else {
-    return false;
-  }
+  return (confirm("Send this?")) ? true : false;
 }
 
-$(function () {
+$(function() {
   $('#navigation_ul').tinyNav({
     active: 'selected'
   });
diff -r 09e0cac50959 -r d573ad9eb1e0 public_html/layout/denim/style.css
--- a/public_html/layout/denim/style.css	Tue Apr 24 08:06:12 2012 +0900
+++ b/public_html/layout/denim/style.css	Tue Apr 24 10:17:06 2012 +0900
@@ -583,7 +583,6 @@
   color: #000;
   background: #FFFF8F;
   line-height: 120%;
-
 }
 
 .pluginRow1 .pluginRollOut,
@@ -685,12 +684,12 @@
 }
 
 .noborder_fieldset {
- margin: 0;
- border: none;
+  margin: 0;
+  border: none;
 }
 
 .hidden_legend {
- display: none;
+  display: none;
 }
 
 /* Basic editor */
@@ -850,16 +849,12 @@
 }
 
 /*==============================================================================
-  JavaScript enabled
-    * Always set 'js_on'
+  Layout Pattern:
     * 3 Column ( Left Block * Center Block * Right Block )...left-center-right
     * 2 Column ( Left Block * Center Block )              ...left-center
     * 2 Column ( Center Block * Right Block )             ...center-right
     * 1 Column ( Center Block )                           ...center
 
-  JavaScript Disenabled: HTML body class attribute is always 3 Column
-    * Always set 'js_off'
-
   Block Width:
     * Container Width = 100%
     * Header Width    = 100%
@@ -1019,8 +1014,7 @@
   display if Left Block is appeared.
 --------------------------------------*/
 
-#leftblocks,
-body.js_off #leftblocks {
+#leftblocks {
   overflow: auto;
   float: left;
   width: 180px;  /* [L] */
@@ -1039,15 +1033,13 @@
 }
 
 /* JavaScript Enabled* 3 Column ( Left Block*  Center Block*  Right Block)  Center Block Container */
-body.left-center-right #centerblocks,
-body.js_off #centerblocks {
+body.left-center-right #centerblocks {
   float: left;
   width: 100%;
   margin: 0;
   padding: 0;
 }
-body.left-center-right #main-content,
-body.js_off #main-content {
+body.left-center-right #main-content {
   width: 660px;  /* Main Content Width = [W] - [L] - [R] -  Right Padding 10px -  Left Padding 10px */
   margin: 0 280px 0 180px;  /* Right Margin = [R] , Left Margin = [L] */
   padding: 0 10px;
@@ -1097,8 +1089,7 @@
   #rightblocks display if Right Block is appeared.
 --------------------------------------*/
 
-#rightblocks,
-body.js_off #rightblocks {
+#rightblocks {
   overflow: auto;
   float: left;
   width: 280px;  /* [R] */
@@ -1535,7 +1526,6 @@
 }
 
 .article {
-/*  font-size: 115%;*/
   font-size: 100%;
 }
 
@@ -1576,35 +1566,35 @@
 
 .gl-tooltip:link,
 .gl-tooltip:visited {
-    color: #2661A2;
-    outline: none;
-    text-decoration: none;
-    position: relative;
+  color: #2661A2;
+  outline: none;
+  text-decoration: none;
+  position: relative;
 }
 .gl-tooltip span {
-    margin-left: -999em;
-    position: absolute;
-    text-align: left;
-    width: 250px;
+  margin-left: -999em;
+  position: absolute;
+  text-align: left;
+  width: 250px;
 }
 .gl-tooltip:hover span {
-    border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px;
-    box-shadow: 2px 2px 8px #666; -webkit-box-shadow: 2px 2px 8px #666; -moz-box-shadow: 2px 2px 8px #666;
-    font-size: 1em; text-align: left; white-space:normal;
-    font-family: Calibri, Tahoma, Geneva, sans, sans-serif;
-    position: absolute; left: 2.2em; top: 2.2em; z-index: 99;
-    margin-left: 0; width: 250px;
+  border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px;
+  box-shadow: 2px 2px 8px #666; -webkit-box-shadow: 2px 2px 8px #666; -moz-box-shadow: 2px 2px 8px #666;
+  font-size: 1em; text-align: left; white-space:normal;
+  font-family: Calibri, Tahoma, Geneva, sans, sans-serif;
+  position: absolute; left: 2.2em; top: 2.2em; z-index: 99;
+  margin-left: 0; width: 250px;
 }
 .gl-tooltip:hover img.icon {
-    border: 0; margin: -15px 0 0 -51px;
-    float: left; position: absolute;
+  border: 0; margin: -15px 0 0 -51px;
+  float: left; position: absolute;
 }
 #gl-tooltip-icon {
-    border: 0;
+  border: 0;
 }
 .gl-tooltip:hover em {
-    font-family: Candara, Tahoma, Geneva, sans, sans-serif; font-size: 1.2em; font-weight: bold;
-    display: block; padding: 0.2em 0 0.6em 0.4em;
+  font-family: Candara, Tahoma, Geneva, sans, sans-serif; font-size: 1.2em; font-weight: bold;
+  display: block; padding: 0.2em 0 0.6em 0.4em;
 }
 span.classic     { padding: 0.8em 1em; }
 span.custom      { padding: 0.5em 0.8em 0.8em 2em; }
@@ -1859,86 +1849,86 @@
 }
 
 #navlist {
-    display: block;
-    margin: 0 0 20px 0;
-    padding: 0;
-    border-bottom: solid 1px #ddd;
-    list-style: none;
+  display: block;
+  margin: 0 0 20px 0;
+  padding: 0;
+  border-bottom: solid 1px #ddd;
+  list-style: none;
 }
 
 .li-navlist {
-    display: block;
-    width: auto;
-    height: 30px;
-    padding: 0;
-    float: left;
-    margin-bottom: 0;
+  display: block;
+  width: auto;
+  height: 30px;
+  padding: 0;
+  float: left;
+  margin-bottom: 0;
 }
 
 .a-navlist {
-    display: block;
-    text-decoration: none;
-    width: auto;
-    height: 29px;
-    padding: 0px 12px;
-    line-height: 30px;
-    border: solid 1px #ddd;
-    border-width: 1px 1px 0 0;
-    margin: 0;
-    background: #f5f5f5;
+  display: block;
+  text-decoration: none;
+  width: auto;
+  height: 29px;
+  padding: 0px 12px;
+  line-height: 30px;
+  border: solid 1px #ddd;
+  border-width: 1px 1px 0 0;
+  margin: 0;
+  background: #f5f5f5;
 }
 
 .li-navlist #current {
-    background: #fff;
-    height: 30px;
-    position: relative;
-    top: -4px;
-    padding-top: 4px;
-    border-left-width: 1px;
-    margin: 0 0 0 -1px;
-    color: #111;
-    -moz-border-radius-topleft: 3px;
-    -webkit-border-top-left-radius: 3px;
-    border-top-left-radius: 3px;
-    -moz-border-radius-topright: 3px;
-    -webkit-border-top-right-radius: 3px;
-    border-top-right-radius: 3px;
+  background: #fff;
+  height: 30px;
+  position: relative;
+  top: -4px;
+  padding-top: 4px;
+  border-left-width: 1px;
+  margin: 0 0 0 -1px;
+  color: #111;
+  -moz-border-radius-topleft: 3px;



More information about the geeklog-cvs mailing list