<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 2/4/2015 10:59 PM, Paulo Ricardo Paz
Vital wrote:<br>
</div>
<blockquote
cite="mid:CAFe=of56u9Wr21rv6SbT3zB_HDXDtxTOr81WU5y2yCCaT1+gXg@mail.gmail.com"
type="cite">Few comments below...<br>
<br>
<div class="gmail_quote">On Wed Feb 04 2015 at 3:21:50 PM Wen Wang
<<a moz-do-not-send="true"
href="mailto:wenwang@linux.vnet.ibm.com">wenwang@linux.vnet.ibm.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by:
Wen Wang <<a moz-do-not-send="true"
href="mailto:wenwang@linux.vnet.ibm.com" target="_blank">wenwang@linux.vnet.ibm.com</a>><br>
---<br>
ui/css/theme-default/list-flat.css | 83
++++++++++++++++++++++++++++++++++++++<br>
ui/js/widgets/list-flat.js | 76
++++++++++++++++++++++++++++++++++<br>
2 files changed, 159 insertions(+)<br>
create mode 100644 ui/css/theme-default/list-flat.css<br>
create mode 100644 ui/js/widgets/list-flat.js<br>
<br>
diff --git a/ui/css/theme-default/list-flat.css
b/ui/css/theme-default/list-flat.css<br>
new file mode 100644<br>
index 0000000..ba0439d<br>
--- /dev/null<br>
+++ b/ui/css/theme-default/list-flat.css<br>
@@ -0,0 +1,83 @@<br>
+/*<br>
+ * Project Kimchi<br>
+ *<br>
+ * Copyright IBM, Corp. 2015<br>
+ *<br>
+ * Licensed under the Apache License, Version 2.0 (the
'License');<br>
+ * you may not use this file except in compliance with the
License.<br>
+ * You may obtain a copy of the License at<br>
+ *<br>
+ * <a moz-do-not-send="true"
href="http://www.apache.org/licenses/LICENSE-2.0"
target="_blank">http://www.apache.org/licenses/LICENSE-2.0</a><br>
+ *<br>
+ * Unless required by applicable law or agreed to in writing,
software<br>
+ * distributed under the License is distributed on an 'AS IS'
BASIS,<br>
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied.<br>
+ * See the License for the specific language governing
permissions and<br>
+ * limitations under the License.<br>
+ */<br>
+<br>
+.list-titlef {<br>
+ height: 30px;<br>
+ line-height: 30px;<br>
+ width: 25%;<br>
+ border-bottom: 1px solid #DEDEDE;<br>
+ color: #626262;<br>
+ font-size: 17px;<br>
+ padding: 10px 0;<br>
+ background: white;<br>
+}<br>
+<br>
+.list-content {<br>
+ height: 300px;<br>
+ width: 25%;<br>
+}<br>
+<br>
+.list-item {<br>
+ border-bottom: 1px solid #F5F5F5;<br>
+ height: 40px;<br>
+}<br>
+<br>
+.list-item-odd {<br>
+ background: #FFFFFF;<br>
+}<br>
+<br>
+.list-item-even {<br>
+ background: #FCFCFC;<br>
+}<br>
+<br>
+.list-item:hover {<br>
+ background: #DDDDDD;<br>
+}<br>
+<br>
+.list-inline {<br>
+ display: inline-block;<br>
+}<br>
+<br>
+.list-item-icon {<br>
+ line-height: 20px;<br>
+ vertical-align: 35%;<br>
+}<br>
+<br>
+.list-item-info {<br>
+ position: relative;<br>
+ margin-left: 10px;<br>
+ margin-right: 10px;<br>
+}<br>
+<br>
+.list-item-name {<br>
+ font-size: 14px;<br>
+ line-height: 14px;<br>
+ padding: 9px 0 0;<br>
+}<br>
+<br>
+.list-item-button {<br>
+ position: relative;<br>
+ width: 150px;<br>
+ padding: 5px;<br>
+ float: right;<br>
+}<br>
+<br>
+.list-item-detail {<br>
+ font-size: 11px;<br>
+ color: #CDCDCD;<br>
+}<br>
\ No newline at end of file<br>
diff --git a/ui/js/widgets/list-flat.js
b/ui/js/widgets/list-flat.js<br>
new file mode 100644<br>
index 0000000..f76eec6<br>
--- /dev/null<br>
+++ b/ui/js/widgets/list-flat.js<br>
@@ -0,0 +1,76 @@<br>
+/*<br>
+ * Project Kimchi<br>
+ *<br>
+ * Copyright IBM, Corp. 2015<br>
+ *<br>
+ * Licensed under the Apache License, Version 2.0 (the
'License');<br>
+ * you may not use this file except in compliance with the
License.<br>
+ * You may obtain a copy of the License at<br>
+ *<br>
+ * <a moz-do-not-send="true"
href="http://www.apache.org/licenses/LICENSE-2.0"
target="_blank">http://www.apache.org/licenses/LICENSE-2.0</a><br>
+ *<br>
+ * Unless required by applicable law or agreed to in writing,
software<br>
+ * distributed under the License is distributed on an 'AS IS'
BASIS,<br>
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied.<br>
+ * See the License for the specific language governing
permissions and<br>
+ * limitations under the License.<br>
+ */<br>
+<br>
+ // How to use:<br>
+ // $(".test-bar").listFlat({<br>
+ // title: "Hello World" //Set title.<br>
+ // });<br>
+ // $(".test-bar").listFlat("addItem", "Hello",
"2015", "icon-user", "button1");<br>
+ // //Add one item of the list, parameters
are: name, info, icon and button-id<br>
</blockquote>
<div><br>
</div>
<div>Indentation of the comment is wrong - looks for me there's
one more TAB.</div>
<div>Also, would be nice to place the comment before the
operation.</div>
</div>
</blockquote>
I have checked I might not be able to find the tab. If there is any,
could you please be more specific in which way I can find and have
it replaced.<br>
Comments is used for the usage of the widgets and there will be a
sample html file used for the demo of the widgets. I prefer to place
it here in which way user could see the usage of the widgets either
in the demo html file or within the widgets. <br>
<blockquote
cite="mid:CAFe=of56u9Wr21rv6SbT3zB_HDXDtxTOr81WU5y2yCCaT1+gXg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+<br>
+ (function($) {<br>
+<br>
+ $.widget("kimchi.listFlat", {<br>
+<br>
+ options: {<br>
+ title: null<br>
+ },<br>
+<br>
+ _create: function() {<br>
+ var that = this;<br>
+ var listTitle = that.options.title;<br>
+ var titleTrim = listTitle.replace(/\s*/g, "");<br>
+ var html = "";<br>
+ html += "<div class='list-titlef'>" +
listTitle + "</div>" +<br>
+ "<div class='list-content' id='list" +
titleTrim + "'></div>";<br>
+ $(html).appendTo(that.element);<br>
+ },<br>
+<br>
+ _getTitle: function() {<br>
+ return this.options.title;<br>
+ },<br>
+<br>
+ addItem: function(name, detail, icon, id) {<br>
+ var title = this._getTitle().replace(/\s/g, "");<br>
+ var usedIcon = icon || "";<br>
+ var html = "";<br>
+ html += "<div class='list-item'>" +<br>
+ "<span class='list-inline
list-item-icon " + usedIcon + "'></span>" +<br>
+ "<span class='list-inline
list-item-info'>"+<br>
+ "<div
class='list-item-name'>" + name + "</div>" +<br>
+ "<div
class='list-item-detail'>" + detail + "</div>" +<br>
+ "</span>" +<br>
+ "<span class='list-inline
list-item-button' id='" + id + "'></span>" +<br>
+ "</div>";<br>
+ $(html).appendTo($("#list" + title));<br>
+ $.each($(".list-item"), function(index, data) {<br>
+ if(index%2 >0) {<br>
+ $(this).addClass("list-item-even");<br>
+ } else {<br>
+ $(this).addClass("list-item-odd");<br>
+ }<br>
+ })<br>
+ console.log("title");<br>
+ },<br>
+<br>
+ _destory: function() {<br>
+ this.element.remove();<br>
+ }<br>
+ });<br>
+ })(jQuery);<br>
\ No newline at end of file<br>
--<br>
2.1.0<br>
<br>
_______________________________________________<br>
Kimchi-devel mailing list<br>
<a moz-do-not-send="true" href="mailto:Kimchi-devel@ovirt.org"
target="_blank">Kimchi-devel@ovirt.org</a><br>
<a moz-do-not-send="true"
href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel"
target="_blank">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>