Skip to content
Browse files

some small changes

  • Loading branch information...
1 parent 278fc40 commit cbafb2cb535a8f37257eb60453df25a42886ecc1 @coomsie committed May 27, 2011
View
9 Resources/views/v_GaugingCard_FieldData.js
@@ -419,6 +419,15 @@ Ti.App.addEventListener('change_fielddata', function(e) {
animated:true
});
if (e.title ==='Type: FlowTracker' || e.title ==='Type: ADCP') {
+
+row = Ti.UI.createTableViewRow({
+ height:50
+});
+
+//tb_spintestafter.hide;
+//row.add(lb_spintestafter);
+//row.add(tb_spintestafter);
+
tableView.updateRow(1, {
title:'n/a'
}, {
View
17 Resources/views/v_GaugingCard_FieldDataMeters.js
@@ -25,11 +25,8 @@ function fn_buildmeterTbl(mymetertypes) {
Ti.API.info('fullist? ' + fulllist + 'mymetertypes lght ' + mymetertypes.data.item.length);
if (mymetertypes.data.length !==0) {
///restrict list to x number or favourte list
- var mlength=mymetertypes.data.item.length;
- if (fulllist === false) mlength = 6;
- for (var i = mlength - 1; i >= 0; i--) {
+ for (var i = mymetertypes.data.item.length - 1; i >= 0; i--) {
{
- //Ti.API.debug(mymetertypes.data.item[i]);
var lb1 = Titanium.UI.createLabel({
color:'#666',
text:mymetertypes.data.item[i].name,
@@ -41,8 +38,20 @@ function fn_buildmeterTbl(mymetertypes) {
className:"metertypesdata"
});
thisRow.add(lb1);
+
+ ///favourite check
+ if (fulllist === false)
+ {
+ //only add if favourite
+ if (mymetertypes.data.item[i].Fav === 'true' )
data.push(thisRow);
}
+ else
+ {
+ data.push(thisRow);
+ }
+
+ }
};
}
View
9 Resources/views/v_GaugingCard_StageReadingsAdd.js
@@ -1,3 +1,5 @@
+Titanium.include('../../helpers/validation.js');
+
//create UI objects
var win = Ti.UI.currentWindow;
@@ -63,8 +65,15 @@ tb_time.value = win.data.datetaken;
tb_time.addEventListener('blur',function(e){
rdata.datetaken = e.source.value;
edited = true;
+ if(e.source.isValid === false)
+ displayValErr();
+});
+
+tb_time.addEventListener('change', function(e) {
+ tb_time.isValid = checkValidation(tb_time);
});
+
row.add(lb_time);
row.add(tb_time);

0 comments on commit cbafb2c

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