[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6856] trunk/UI
- Subject: SF.net SVN: ledger-smb:[6856] trunk/UI
- From: ..hidden..
- Date: Thu, 13 Feb 2014 19:40:46 +0000
Revision: 6856
http://sourceforge.net/p/ledger-smb/code/6856
Author: tshvr
Date: 2014-02-13 19:40:46 +0000 (Thu, 13 Feb 2014)
Log Message:
-----------
no more prototype.js,scriptaculous.js,helpers.js in trunk;bug 1057 emitter listener in AccountStore AccountSelector
Modified Paths:
--------------
trunk/UI/Reports/filters/gl.html
trunk/UI/accounts/AccountSelector.js
trunk/UI/accounts/AccountStore.js
Modified: trunk/UI/Reports/filters/gl.html
===================================================================
--- trunk/UI/Reports/filters/gl.html 2014-02-13 14:23:44 UTC (rev 6855)
+++ trunk/UI/Reports/filters/gl.html 2014-02-13 19:40:46 UTC (rev 6856)
@@ -1,5 +1,4 @@
<?lsmb INCLUDE 'ui-header.html'
- include_script = ["UI/ajax/scriptaculous/lib/prototype.js","UI/ajax/scriptaculous/src/scriptaculous.js?load=builder,effects,dragdrop,controls","UI/ajax/helpers.js"]
?>
<?lsmb PROCESS 'elements.html';
PROCESS 'report_base.html' ?>
@@ -32,6 +31,7 @@
<tr>
<th align="right"><?lsmb text('Account') ?></th>
<td colspan="3">
+ <!-- tshvr fixed accno is better here, but commented for test
<?lsmb IF accno;
accno;
PROCESS input element_data = {
@@ -43,11 +43,21 @@
PROCESS input element_data = {
name = "accno"
size = '15'
- value = ''
+ value = accno
type = 'text'
class = 'AccountBox'
};
END ?> </td>
+ -->
+ <!-- tshvr test http://sourceforge.net/p/ledger-smb/bugs/1057/ -->
+ <?lsmb PROCESS input element_data = {
+ name = "accno"
+ size = '15'
+ value = accno
+ type = 'text'
+ class = 'AccountBox'
+ } ?> </td>
+ <!--tshvr end test-->
</tr>
<tr>
<th align="right"><?lsmb text('Source') ?></th>
Modified: trunk/UI/accounts/AccountSelector.js
===================================================================
--- trunk/UI/accounts/AccountSelector.js 2014-02-13 14:23:44 UTC (rev 6855)
+++ trunk/UI/accounts/AccountSelector.js 2014-02-13 19:40:46 UTC (rev 6856)
@@ -14,8 +14,21 @@
query: {'charttype': 'A'},
highlightMatch: 'all',
searchAttr: 'text',
- autoComplete: false
-
+ autoComplete: false,
+ initialValue:null,
+ constructor:function(){
+ this.inherited(arguments);
+ console.log('arguments',arguments);
+ this.initialValue=arguments[0].value;
+ },
+ postCreate:function(){
+ var mySelf=this;
+ this.inherited(arguments);
+ store.emitter.on("accountstore_loadcomplete",function(){
+ console.log('AccountSelector accountstore_loadcomplete mySelf=',mySelf);
+ mySelf.set('value',mySelf.initialValue);
+ });
+ }//postCreate
});
return mySelect;
});
Modified: trunk/UI/accounts/AccountStore.js
===================================================================
--- trunk/UI/accounts/AccountStore.js 2014-02-13 14:23:44 UTC (rev 6855)
+++ trunk/UI/accounts/AccountStore.js 2014-02-13 19:40:46 UTC (rev 6856)
@@ -2,15 +2,18 @@
'dojo/store/Memory',
'dojo/store/Observable',
'dojo/request',
- 'dojo/_base/array'
+ 'dojo/_base/array',
+ "dojo/Evented"
], function(
Memory,
Observable,
request,
- array
+ array,
+ Evented
){
var store = new Observable(new Memory({
- idProperty: 'text'
+ idProperty: 'text',
+ emitter:new Evented()
}));
request.get('journal.pl?action=chart_json',{
@@ -21,8 +24,10 @@
item.text = item.accno + '--' + item.description;
store.put(item);
});
+ console.log('AccountStore emitting loadclomplete');
+ store.emitter.emit("accountstore_loadcomplete",{bubbles: true,cancelable: false});
},
- console.log
+ function(error){console.error(eror);}
);
return store;
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits