1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.util.CSS</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.util.CSS-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.util.CSS-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.util.CSS-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.util.CSS-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Package:</td><td class="hd-info">Roo.util</td></tr>
57 <tr><td class="label">Defined In:</td><td class="hd-info">
59 <a href="./src/Roo_util_CSS.js.html">Roo/util/CSS.js</a>.
62 <tr><td class="label">Class:</td><td class="hd-info">CSS</td></tr>
70 <!-- ============================== class summary ========================== -->
71 <div class="description">
72 Utility class for manipulating CSS rules
76 <!-- ============================== Class comment block... ========================== -->
78 <div class="comments">
79 <b>Class Comments / Notes</B> =>
80 <u onclick="parent.CommentDialog.showCommentId = 'Roo.util.CSS';">[Add Your comment/notes about this class]</u>
82 <iframe frameborder="0" id="comments-Roo.util" style="border: none;width:100%;"
83 src="/blog.php/GtkDjsComments/Roo.util.CSS.html"></iframe>
88 <!-- ============================== config options ========================== -->
93 <div class="hr"></div>
94 <a id="Roo.util.CSS-configs"></a>
98 <table cellspacing="0" class="member-table">
99 <caption class="Empty">Config Options - Has None</caption>
113 <!-- ============================== public properties ==================== -->
117 <a id="Roo.util.CSS-props"></a>
123 <table cellspacing="0" class="member-table">
124 <caption class="Empty">Public Properties - Has None</caption>
130 <!-- ============================== methods summary / details ======================== -->
133 <a id="Roo.util.CSS-methods"></a>
134 <!-- constructor?? -->
141 <!-- then dynamics first -->
148 <table cellspacing="0" class="member-table">
149 <caption>Public Methods</caption>
151 <th class="sig-header" colspan="2">Method</th>
152 <th class="msource-header">Defined By</th>
162 <tr class="method-row config-row-alt0 expandable notInherited">
163 <td class="micon"><a class="exi" href="#expand"> </a></td>
167 <a id="Roo.util.CSS-method-createStyleSheet" name=".createStyleSheet"></a>
168 <div class="fixedFont">
169 <span class="attributes">Roo.util.CSS.</span><b class="itemname">createStyleSheet</b>
171 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>cssText</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
186 <div class="short">Very simple dynamic creation of stylesheets from a text blob of rules.</div>
192 Very simple dynamic creation of stylesheets from a text blob of rules. The text will wrapped in a style<br/>tag and appended to the HEAD of the document.
199 <dl class="detailList">
200 <dt class="heading">Parameters:</dt>
203 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>cssText</b>
206 <dd>The text containing the css rules</dd>
209 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
212 <dd>An id to add to the stylesheet for later removal</dd>
220 <dl class="detailList">
221 <dt class="heading">Returns:</dt>
223 <dd><span class="fixedFont">StyleSheet</span> </dd>
245 <tr class="method-row config-row-alt1 expandable notInherited">
246 <td class="micon"><a class="exi" href="#expand"> </a></td>
250 <a id="Roo.util.CSS-method-getRule" name=".getRule"></a>
251 <div class="fixedFont">
252 <span class="attributes">Roo.util.CSS.</span><b class="itemname">getRule</b>
254 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>selector</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>refreshCache</i></B>)
269 <div class="short">Gets an an individual CSS rule by selector(s)</div>
275 Gets an an individual CSS rule by selector(s)
282 <dl class="detailList">
283 <dt class="heading">Parameters:</dt>
286 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>selector</b>
289 <dd>The CSS selector or an array of selectors to try. The first selector that is found is returned.</dd>
292 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>refreshCache</b>
295 <dd>true to refresh the internal cache if you have recently updated any rules or added styles dynamically</dd>
303 <dl class="detailList">
304 <dt class="heading">Returns:</dt>
306 <dd><span class="fixedFont">CSSRule</span> The CSS rule or null if one is not found</dd>
328 <tr class="method-row config-row-alt0 expandable notInherited">
329 <td class="micon"><a class="exi" href="#expand"> </a></td>
333 <a id="Roo.util.CSS-method-getRules" name=".getRules"></a>
334 <div class="fixedFont">
335 <span class="attributes">Roo.util.CSS.</span><b class="itemname">getRules</b>
337 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>refreshCache</i></B>)
343 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
352 <div class="short">Gets all css rules for the document</div>
358 Gets all css rules for the document
365 <dl class="detailList">
366 <dt class="heading">Parameters:</dt>
369 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>refreshCache</b>
372 <dd>true to refresh the internal cache</dd>
380 <dl class="detailList">
381 <dt class="heading">Returns:</dt>
383 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> An object (hash) of rules indexed by selector</dd>
405 <tr class="method-row config-row-alt1 expandable notInherited">
406 <td class="micon"><a class="exi" href="#expand"> </a></td>
410 <a id="Roo.util.CSS-method-refreshCache" name=".refreshCache"></a>
411 <div class="fixedFont">
412 <span class="attributes">Roo.util.CSS.</span><b class="itemname">refreshCache</b>
420 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
429 <div class="short">Refresh the rule cache if you have dynamically added stylesheets</div>
435 Refresh the rule cache if you have dynamically added stylesheets
446 <dl class="detailList">
447 <dt class="heading">Returns:</dt>
449 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> An object (hash) of rules indexed by selector</dd>
471 <tr class="method-row config-row-alt0 expandable notInherited">
472 <td class="micon"><a class="exi" href="#expand"> </a></td>
476 <a id="Roo.util.CSS-method-removeStyleSheet" name=".removeStyleSheet"></a>
477 <div class="fixedFont">
478 <span class="attributes">Roo.util.CSS.</span><b class="itemname">removeStyleSheet</b>
480 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
487 <div class="short">Removes a style or link tag by id</div>
493 Removes a style or link tag by id
500 <dl class="detailList">
501 <dt class="heading">Parameters:</dt>
504 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
507 <dd>The id of the tag</dd>
533 <tr class="method-row config-row-alt1 expandable notInherited">
534 <td class="micon"><a class="exi" href="#expand"> </a></td>
538 <a id="Roo.util.CSS-method-swapStyleSheet" name=".swapStyleSheet"></a>
539 <div class="fixedFont">
540 <span class="attributes">Roo.util.CSS.</span><b class="itemname">swapStyleSheet</b>
542 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>url</i></B>)
549 <div class="short">Dynamically swaps an existing stylesheet reference for a new one</div>
555 Dynamically swaps an existing stylesheet reference for a new one
562 <dl class="detailList">
563 <dt class="heading">Parameters:</dt>
566 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
569 <dd>The id of an existing link tag to remove</dd>
572 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>url</b>
575 <dd>The href of the new stylesheet to include</dd>
601 <tr class="method-row config-row-alt0 expandable notInherited">
602 <td class="micon"><a class="exi" href="#expand"> </a></td>
606 <a id="Roo.util.CSS-method-updateRule" name=".updateRule"></a>
607 <div class="fixedFont">
608 <span class="attributes">Roo.util.CSS.</span><b class="itemname">updateRule</b>
610 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>selector</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>property</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>value</i></B>)
616 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
625 <div class="short">Updates a rule property</div>
631 Updates a rule property
638 <dl class="detailList">
639 <dt class="heading">Parameters:</dt>
642 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>selector</b>
645 <dd>If it's an array it tries each selector until it finds one. Stops immediately once one is found.</dd>
648 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>property</b>
651 <dd>The css property</dd>
654 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>value</b>
657 <dd>The new value for the property</dd>
665 <dl class="detailList">
666 <dt class="heading">Returns:</dt>
668 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> true If a rule was found and updated</dd>
693 <!-- ============================== events summary / details ======================== -->
696 <a id="Roo.util.CSS-events"></a>
702 <table cellspacing="0" class="member-table">
703 <caption class="Empty">Events - Has None</caption>
714 <!-- ============================== footer ================================= -->
715 <div class="fineprint" style="clear:both">
717 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Thu Aug 27 2015 12:18:49 GMT+0800 (HKT)
719 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>