rem: var mode; if (mode = req.postParams.mode) {  var zip = new helma.Zip(); this.exportToZip(zip); this.images.exportToZip(zip, mode); this.skins.exportToZip(zip, mode); zip.addData(new java.lang.String({ source: this.href(), created: new Date, creator: session.user.name, mode: mode }.toSource()).getBytes("UTF-8"), "export.js"); zip.close(); res.contentType = "application/zip"; res.setHeader("Content-Disposition", "attachment; filename=" + this.name + ".zip"); res.writeBinary(zip.getData());  /*} catch (ex) { res.message = ex; 
add: var zip = new helma.Zip(); for each (var fpath in res.skinpath) { zip.add(new helma.File(fpath), "layout"); } var file, prototype; var dir = new helma.File(app.dir); for each (var fpath in dir.listRecursive(/\.skin$/)) { prototype = fpath.split("/").splice(-2)[0]; file = new helma.File(fpath); try { zip.add(file, "layout/" + prototype); } catch (ex) { 
context: Layout.prototype.export_action = function() {   var mode;   if (mode = req.postParams.mode) {      //try {         var zip = new helma.Zip();         this.exportToZip(zip);         this.images.exportToZip(zip, mode);         this.skins.exportToZip(zip, mode);         zip.addData(new java.lang.String({            source: this.href(),            created: new Date,            creator: session.user.name,            mode: mode         }.toSource()).getBytes("UTF-8"), "export.js");         zip.close();         res.contentType = "application/zip";         res.setHeader("Content-Disposition",                "attachment; filename=" + this.name + ".zip");         res.writeBinary(zip.getData());         //res.redirect(this.href());      /*} catch (ex) {         res.message = ex;         app.log(ex);      }*/   }   res.data.action = this.href(req.action);   res.data.title = gettext("Export layout {0}", this.title);   res.data.body = this.renderSkinAsString("download");   res.handlers.context.renderSkin("page");   return;};
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/3efbd63046d0de34a59bbe00c11a37b157f1b745/Layout.js/clean/code/Layout/Layout.js