summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-06-14 12:47:28 +0000
committerxue <>2006-06-14 12:47:28 +0000
commit0ebf1c0fcc8f4396c4637a8afb42bbdaa6721cfe (patch)
tree8abf5337834204eaefa2be72d5e1e437e4259418
parentc97b571b49e71d33d10959d96e7ad30bd54f1d5a (diff)
CSS and JS files in a theme are now included in page in alphabetic order
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/TThemeManager.php2
-rw-r--r--framework/Xml/TXmlDocument.php36
3 files changed, 39 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index ce142543..818bfd41 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ BUG: Ticket#191 - Duplicated postbacks occur when using TButton with validators
BUG: Ticket#213 - PRADO Requirements Checker charset error (Qiang)
CHG: ensureChildControls() is now invoked in TControl::initRecursive (Qiang)
CHG: Postback enabled control will always disable default client-side browser action. (Qiang)
+CHG: CSS and JS files in a theme are now included in page in alphabetic order (Qiang)
ENH: TRepeater, TDataList and TDataGrid will store data indices in DataKeys if DataKeyField is not set. (Qiang)
ENH: Added TPageService.BasePageClass property (Qiang)
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index fcb20a81..66bfa8be 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -305,6 +305,8 @@ class TTheme extends TApplicationComponent implements ITheme
}
}
closedir($dir);
+ sort($this->_cssFiles);
+ sort($this->_jsFiles);
if($cache!==null)
$cache->set(self::THEME_CACHE_PREFIX.$themePath,array($this->_skins,$this->_cssFiles,$this->_jsFiles,time()));
}
diff --git a/framework/Xml/TXmlDocument.php b/framework/Xml/TXmlDocument.php
index 62793cf4..52438da6 100644
--- a/framework/Xml/TXmlDocument.php
+++ b/framework/Xml/TXmlDocument.php
@@ -229,6 +229,42 @@ class TXmlElement extends TComponent
* You can also get the version and encoding of the XML document by
* the Version and Encoding properties.
*
+ * To construct an XML string, you may do the following:
+ * <code>
+ * $doc=new TXmlDocument('1.0','utf-8');
+ * $doc->TagName='Root';
+ *
+ * $proc=new TXmlElement('Proc');
+ * $proc->setAttribute('Name','xxxx');
+ * $doc->Elements[]=$proc;
+ *
+ * $query=new TXmlElement('Query');
+ * $query->setAttribute('ID','xxxx');
+ * $proc->Elements[]=$query;
+ *
+ * $attr=new TXmlElement('Attr');
+ * $attr->setAttribute('Name','aaa');
+ * $attr->Value='1';
+ * $query->Elements[]=$attr;
+ *
+ * $attr=new TXmlElement('Attr');
+ * $attr->setAttribute('Name','bbb');
+ * $attr->Value='1';
+ * $query->Elements[]=$attr;
+ * </code>
+ * The above code represents the following XML string:
+ * <code>
+ * <?xml version="1.0" encoding="utf-8"?>
+ * <Root>
+ * <Proc Name="xxxx">
+ * <Query ID="xxxx">
+ * <Attr Name="aaa">1</Attr>
+ * <Attr Name="bbb">1</Attr>
+ * </Query>
+ * </Proc>
+ * </Root>
+ * </code>
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Xml