New improved version of the wireframe file editor from last post.  This one
refreshes the data automatically and returns you to the same fuseaction.
Also, I consolidated the code into one file.

These have changed:
In dspWireframe.cfm:

<A
HREF="javascript:editFile('#attributes.applicationname#.wir','#attributes.fu
seaction#')"><FONT SIZE=-2>Edit&nbsp;data&nbsp;file</FONT></A>

Javascript in header of dspWireframe.cfm:
<script>
var newWindow;
function editFile(filename,fuseaction){
url = "dspEditWir2.cfm?filename=" + filename + "&fuseaction=" + fuseaction;
if (!newWindow||newWindow.closed){
  newWindow =
window.open(url,"","top=50,left=100,height=620,width=850,status=yes");
  newWindow.focus();
 }
}
</script>

And you only need this one file in the wireframe directory:
dspEditWir.cfm

<cfif Not IsDefined("form.submit")>
<html>
<head>
 <title><cfoutput>#url.filename#</cfoutput></title>
<style>
textarea {font-size:11px;font-family:Ariel;}
</style>
</head>
<cffile action="READ" file="c:\inetpub\wwwroot\wireframe2\#url.filename#"
variable="content">
<body>
<cfoutput>
<div align="center">
<form action="dspEditWir.cfm" method="post" name="editMe" >
<input type="hidden" name="filename" value="#url.filename#">
<input type="hidden" name="fuseaction" value="#url.fuseaction#">
<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>
<cfelse>
<cfoutput>
<cffile action="WRITE" file="c:\inetpub\wwwroot\wireframe2\#form.filename#"
output="#form.newcontent#" addnewline="no">
 <script>
 var refresh = true;
opener.location="dspWireframe.cfm?refresh=true&applicationname=#Trim(GetToke
n(form.filename,1,'.'))#&fuseaction=#form.fuseaction#";
self.close();
</script>
</cfoutput>
</cfif>

This should work much better.
Mark


> ----- 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