svn: /web/doc-editor/trunk/js/ux/others/login_specific/ Ext.ux.Iconcombo.css Ext.ux.Iconcombo.js

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sat, 18 Dec 2010 10:07:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=306422

Log:
Move remove file with a different name

Changed paths:
    A   web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.css
    A   web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.js

Added: web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.css
===================================================================
--- web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.css	                        (rev 0)
+++ web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.css	2010-12-18 10:07:05 UTC (rev 306422)
@@ -0,0 +1,16 @@
+/*
+* Css for the IconCombo Ux -
+*
+*/
+
+.ux-icon-combo-input {
+    padding-left: 25px !important;
+}
+
+.ux-icon-combo-value {
+    padding-left: 22px !important;
+}
+
+.ux-icon-combo-item {
+    padding-left: 3px !important;
+}
\ No newline at end of file

Added: web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.js
===================================================================
--- web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.js	                        (rev 0)
+++ web/doc-editor/trunk/js/ux/others/login_specific/Ext.ux.Iconcombo.js	2010-12-18 10:07:05 UTC (rev 306422)
@@ -0,0 +1,63 @@
+// create namespace for plugins
+Ext.namespace('Ext.ux.plugins');
+
+/**
+  * Ext.ux.IconCombo Extension Class for Ext 2.x Library -
+  *
+  * @author  Ing. Jozef Sakalos
+  * @version $Id: Ext.ux.IconCombo.js 617 2007-12-20 11:29:56Z jozo $
+  *
+  * @class Ext.ux.IconCombo
+  * @extends Ext.form.ComboBox
+  */
+
+Ext.ux.IconCombo = Ext.extend(Ext.form.ComboBox, {
+    initComponent : function()
+    {
+
+        Ext.apply(this, {
+            tpl:  '<tpl for=".">'
+                + '<div class="x-combo-list-item ux-icon-combo-item">'
+                + '<div class="{' + this.iconClsField + '}" style="position:absolute"></div>'
+                + '<div class="ux-icon-combo-value">{' + this.displayField + '}</div>'
+                + '</div></tpl>'
+        });
+
+        // call parent initComponent
+        Ext.ux.IconCombo.superclass.initComponent.call(this);
+
+    }, // end of function initComponent
+
+    onRender:function(ct, position)
+    {
+        // call parent onRender
+        Ext.ux.IconCombo.superclass.onRender.call(this, ct, position);
+
+        // adjust styles
+        this.wrap.applyStyles({position:'relative'});
+        this.el.addClass('ux-icon-combo-input');
+
+        // add div for icon
+        this.icon = Ext.DomHelper.append(this.el.up('div.x-form-field-wrap'), {
+            tag: 'div', style:'position:absolute'
+        });
+
+    }, // end of function onRender
+
+    setIconCls : function()
+    {
+        var rec = this.store.query(this.valueField, this.getValue()).itemAt(0);
+        if(rec) {
+            this.icon.className = rec.get(this.iconClsField);
+        }
+    }, // end of function setIconCls
+
+    setValue : function(value)
+    {
+        Ext.ux.IconCombo.superclass.setValue.call(this, value);
+        this.setIconCls();
+    } // end of function setValue
+});
+
+// register xtype
+Ext.reg('iconcombo', Ext.ux.IconCombo);
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.