Pman.Builder.JsRender.js
authorAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2011 03:53:06 +0000 (11:53 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2011 03:53:06 +0000 (11:53 +0800)
Pman.Builder.JsRender.js

index 4b09261..4a003cf 100644 (file)
@@ -460,18 +460,13 @@ Pman.Builder.JsRender.prototype =  {
      */
     pathToPart : function()
     {
-         
-        var dir = File.basename(File.dirname(this.path));
-        var modname = dir.split('.').pop();
-        
-        // now we have the 'module name'..
-        var fbits = File.basename(this.path).split('.');
-        fbits.pop(); // remove extension..
-        var npart = fbits.pop(); // this should be 'AdminProjectManager' for example...
-        if (npart.substring(0, modname.length) == modname) {
-            npart = npart.substring(modname.length);
-        }
-        return [ modname , npart];
+        
+        
+        var modname = this.name.split('.').pop();
+        
+        return modname.match(/([A-Z][a-z]+)/g);
+        
+        //return [ modname , npart];