UI/BrowserModel.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2791
a9577f248f04
parent 2779
4d433896b6d6
child 3057
10516539f238
--- a/UI/BrowserModel.py	Mon Aug 12 19:41:53 2013 +0200
+++ b/UI/BrowserModel.py	Mon Aug 12 22:21:53 2013 +0200
@@ -1010,6 +1010,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"
         
@@ -1148,6 +1153,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