UI/BrowserModel.py

changeset 2779
4d433896b6d6
parent 2769
8cbebde7a984
child 2847
1843ef6e2656
child 2965
d133c7edd88a
--- a/UI/BrowserModel.py	Sat Jul 06 18:31:44 2013 +0200
+++ b/UI/BrowserModel.py	Tue Jul 09 19:30:56 2013 +0200
@@ -1008,6 +1008,11 @@
             pixName = "filePixmap.png"
         elif self.isDFile():
             pixName = "fileD.png"
+        elif self.isJavaScriptFile():
+            pixName = "fileJavascript.png"
+            self._populated = False
+            self._lazyPopulation = True
+            self._moduleName = os.path.basename(finfo)
         else:
             pixName = "fileMisc.png"
         
@@ -1146,6 +1151,14 @@
         """
         return self.fileext == '.idl'
     
+    def isJavaScriptFile(self):
+        """
+        Public method to check, if this file is a JavaScript file.
+        
+        @return flag indicating a JavaScript file (boolean)
+        """
+        return self.fileext == '.js'
+    
     def isPixmapFile(self):
         """
         Public method to check, if this file is a pixmap file.

eric ide

mercurial