Hi guys.
 I've been watching this thread closely as I work through a major wireframed
app. I've been using Lee's version (or is that Borkman's?;)) because it
allows you to break up the app into seperate circuits. I got tired of
hunting for the .wir files when opening the text editor soooooo..... got the
edit window thing going. This opens the .wir file of the current app in a
seperate browser window for editing.

Here it is:

If you use Lee's wireframe:

Simply replace this line in dspWireframe.cfm:
<A HREF="#attributes.applicationname#.wir">
<FONT SIZE=-2>View&nbsp;data&nbsp;file</FONT></A>

With this:
<A HREF="javascript:editFile('#attributes.applicationname#.wir')">
<FONT SIZE=-2>Edit data file</FONT></A>
</h1>

(I haven't tried this, but for Hal's version just use the filename for the
passed parameter?)

Add this javascript to the header:
<script>
var newWindow;
function editFile(filename){
url = "dspEditWir.cfm?filename=" + filename;
if (!newWindow||newWindow.closed){
  newWindow =
window.open(url,"","top=50,left=100,height=620,width=850,status=yes");
  newWindow.focus();
 }
}
</script>


Then add these two files to the wireframe directory:
dspEditWir.cfm  and  actSaveEditWir.cfm

Code for each below:

dspEditWir.cfm

<html>
<head>
 <title><cfoutput>#url.filename#</cfoutput></title>
<style>
textarea {font-size:11px;font-family:Ariel;}
</style>
</head>
<cffile action="READ" file="="***your path here***\wireframe\#url.filename#"
variable="content">
<body>
<cfoutput>
<div align="center">
<form action="actSaveEditWir.cfm" method="post" name="editMe" >
<input type="hidden" name="filename" value="#url.filename#">
<textarea cols="110" rows="40" name="newcontent">
#content#
</textarea>
<br>
<input type="submit" name="submit" value="Save changes" >&nbsp;
<input type="Reset">&nbsp;&nbsp;&nbsp;
<input type="button" name="close" value="Cancel" onclick="self.close();"
>&nbsp;
</form>
</div>
</cfoutput>
</body>
</html>


actSaveEditWir.cfm

<cfoutput>
<cffile action="WRITE" file="***your path here***\wireframe\#form.filename#"
output="#form.newcontent#" addnewline="no">
</cfoutput>
 <script>
opener.location.reload();
self.close();
</script>
Note: script goes after the output tag

You might need to change the style and window size settings to suit you
display.

That's it!

Regards,
Mark F
Imagine Data Solutions

Thanks Hal and Lee!


----- Original Message -----
From: "Patrick McElhaney" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 7:35 AM
Subject: RE: WireFrame Demo Online


> To take this in a COMPLETELY different direction (and I'm
> only posting this in the interest of fueling some
> brilliant discussion), have a look at:
> http://c2.com/cgi/wiki
>
> Patrick
>
> > -----Original Message-----
> > From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 5:48 AM
> > To: Fusebox
> > Subject: RE: WireFrame Demo Online
> >
> >
> > Lets try and focus on the area that all agree is important - usability.
> > My boss's first reaction to Wireframe was "Neat, and can I edit
> > this online"
> > he didn't like needing to go into notepad - Wireframe could have some
> > browser based interface to edit the sections - then it could actually be
> > easier to use - add an "admin=yes" option on the url and voila
> > there appear
> > little buttons next to each item which allow edit/delete/add etc. - only
> > problem is putting in the time to write it.
> > Another side effect of this would be that then it does not matter
> > how it is
> > saved (I did not mention XM..., oops ;-)
> > I do remember reading on some web site that Shane works 25 hours a day
:-)
> > so I'm sure he can get it done quickly, would be a nice project, and get
> > people to your web site to download It, Shane...
> > I'll volunteer for beta testing it (which basically means I'm
> > willing to use
> > the new version, large of me isn't it :) and report/fix bugs as I
> > find them.
> >
> > Noam
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to