comparison browser_side/file_tools.py @ 439:d52f529a6d42

browser side: use of new log system (first draft): - configuration is hardcoded in libervia.py, it will change in the (hopefuly) near future - log level is DEBUG for the moment, will be changed to INFO when configuration will not be hardcoded anymore - the basic log backend is used, in the future, a console.debug/info/etc should be used instead. A log widget which HTML colors is also an option
author Goffi <goffi@goffi.org>
date Thu, 08 May 2014 17:21:34 +0200
parents 462fc3359ee3
children
comparison
equal deleted inserted replaced
438:582c435dab6b 439:d52f529a6d42
15 # GNU Affero General Public License for more details. 15 # GNU Affero General Public License for more details.
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.log import getLogger
21 log = getLogger(__name__)
20 from pyjamas.ui.FileUpload import FileUpload 22 from pyjamas.ui.FileUpload import FileUpload
21 from pyjamas.ui.FormPanel import FormPanel 23 from pyjamas.ui.FormPanel import FormPanel
22 from pyjamas import Window 24 from pyjamas import Window
23 from pyjamas import DOM 25 from pyjamas import DOM
24 from pyjamas.ui.VerticalPanel import VerticalPanel 26 from pyjamas.ui.VerticalPanel import VerticalPanel
121 123
122 def onCloseBtnClick(self): 124 def onCloseBtnClick(self):
123 if self.close_cb: 125 if self.close_cb:
124 self.close_cb() 126 self.close_cb()
125 else: 127 else:
126 print ("WARNING: no close method defined") 128 log.warning("no close method defined")
127 129
128 def onSubmitBtnClick(self): 130 def onSubmitBtnClick(self):
129 if not self.file_upload.check(): 131 if not self.file_upload.check():
130 return 132 return
131 self.message.setHTML(self.texts['submitting']) 133 self.message.setHTML(self.texts['submitting'])