Skip to content
Browse files

Add optimizations.

  • Loading branch information...
1 parent c7ebdf8 commit 7d7ab7516bda069989dd01dba441c4bc85628455 @arcusfelis committed Mar 19, 2013
View
2 config.json
@@ -38,7 +38,7 @@
{
"APPLICATION" : "cascadae",
"QOOXDOO_PATH" : "q_deps/qooxdoo",
- "QXTHEME" : "qx.theme.Modern",
+ "QXTHEME" : "cascadae.theme.Theme",
"API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*",
"${APPLICATION}.test.*", "${APPLICATION}.simulation.*"],
"LOCALES" : [ "en" ],
View
7 priv/html/index.html
@@ -3,6 +3,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cascadae</title>
+ <style>
+ <!--
+ body {
+ font: 12px "Segoe UI", "Candara", "Lucida Grande", "Tahoma",
+ "Verdana", "Bitstream Vera Sans", "Liberation Sans";
+ }
+ </style>
<script type="text/javascript" src="script/cascadae.js"></script>
</head>
<body></body>
View
17 q_src/class/cascadae/BasicTable.js
@@ -158,8 +158,11 @@ qx.Class.define("cascadae.BasicTable",
*/
particallyUpdateRows : function(Rows)
{
- var tm = this.__tableModel;
- var n2p = this.getColumnNameToPositionIndex();
+ var tm = this.__tableModel,
+ n2p = this.getColumnNameToPositionIndex(),
+ sorting_col = tm.getSortColumnIndex(),
+ is_sorting_asc = tm.isSortAscending(),
+ update_sorting = false;
for (var i=0, count=Rows.length; i<count; i++)
{
@@ -185,9 +188,14 @@ qx.Class.define("cascadae.BasicTable",
}
var newValues = qx.lang.Array.clone(oldValues);
-
newValues = this.fillFields(row, newValues, false);
+ // Check, if data in the sorted column was changed.
+ if (!update_sorting && oldValues[sorting_col] != newValues[sorting_col])
+ {
+ update_sorting = true;
+ }
+
/* There is moment, when pos can be changed as result of sorting.
Good practice is to add a mutex, but we just decrease the time
when it can be recalculated.
@@ -196,6 +204,9 @@ qx.Class.define("cascadae.BasicTable",
var pos = tm.locate(n2p.id, row.id);
tm.setRow(pos, newValues);
}
+ if (update_sorting)
+ //this.updateContent();
+ tm.sortByColumn(sorting_col, is_sorting_asc);
this.fireEvent("tableRefreshed");
},
View
24 q_src/class/cascadae/theme/Color.js
@@ -1,15 +1,37 @@
/* ************************************************************************
+ qooxdoo - the new era of web development
+
+ http://qooxdoo.org
+
Copyright:
+ 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de
License:
+ LGPL: http://www.gnu.org/licenses/lgpl.html
+ EPL: http://www.eclipse.org/org/documents/epl-v10.php
+ See the LICENSE file in the project's top-level directory for details.
Authors:
+ * Sebastian Werner (wpbasti)
+ * Andreas Ecker (ecker)
+ * Alexander Steitz (aback)
+ * Martin Wittemann (martinwittemann)
************************************************************************ */
+/**
+ * Modern color theme
+ */
qx.Theme.define("cascadae.theme.Color",
{
extend : qx.theme.modern.Color,
- colors : {}
+ colors :
+ {
+ // equal to "background-pane" and "background-odd"
+ "table-row-background-even" : "transparent",
+ "table-row-background-odd" : "transparent",
+ "progressive-table-row-background-even" : "transparent",
+ "progressive-table-row-background-odd" : "transparent"
+ }
});
View
8 q_src/class/cascadae/theme/Font.js
@@ -10,6 +10,10 @@
qx.Theme.define("cascadae.theme.Font",
{
- extend : qx.theme.modern.Font,
- fonts : {}
+//extend : qx.theme.modern.Font,
+ fonts : {
+ "default" : { },
+ "bold" : { },
+ "small" : { }
+ }
});
View
2 q_src/class/cascadae/theme/Theme.js
@@ -18,4 +18,4 @@ qx.Theme.define("cascadae.theme.Theme",
icon : qx.theme.icon.Tango,
appearance : cascadae.theme.Appearance
}
-});
+});

0 comments on commit 7d7ab75

Please sign in to comment.
Something went wrong with that request. Please try again.