[Proto-Scripty] window.js extension
Hi all, I have written a small extension for the window.js ( http://prototype-window.xilinus.com/ version 1.3). *What does it do?* It adds an optional hover-function for the minimize, maximize and close buttons. Backward-compatibility is guaranteed. *How do I add this feature for my windows or dialog?* 1. apply the diff to the window.js v1.3 2. Add styles-tags for your active and blurred windows ending in _close_hover, maximize_hover and minimize_hover to define the style of your buttons while the mouse hovers over them. 3. Add the option buttonHoverStyles:true, when initializing your window. *What does the .diff do in detail?* It adds the option-default for buttonHoverStyles as false in the initialize-method to guarantee backward-compatibility. In _createWindow() it checkes buttonHoverStyles and accordingly adds in-tag event-handlers for onmouseover and onmouseoutto the button-divs. These in turn change the classname of the div to realise the hover-effect. Have fun! Henning. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/hv8N4Fq76GUJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. 67 buttonHoverStyles: false, 599,601c600,620 var closeDiv = this.options.closable ? div class='+ className +_close' id='+ id +_close' onclick='Windows.close(\+ id +\, event)' /div : ; var minDiv = this.options.minimizable ? div class='+ className + _minimize' id='+ id +_minimize' onclick='Windows.minimize(\+ id +\, event)' /div : ; var maxDiv = this.options.maximizable ? div class='+ className + _maximize' id='+ id +_maximize' onclick='Windows.maximize(\+ id +\, event)' /div : ; --- var closeDiv = ; var minDiv = ; var maxDiv = ; if(this.options.buttonHoverStyles) { closeDiv = this.options.closable ? div class='+ className +_close' id='+ id +_close' onclick='Windows.close(\+ id +\, event)' +onmouseover=\$(' + id + _close').className = $(' + id + _close').className + '_hover';\ +onmouseout=\$(' + id + _close').className = $(' + id + _close').className.sub('_hover','');\ /div : ; minDiv = this.options.minimizable ? div class='+ className + _minimize' id='+ id +_minimize' onclick='Windows.minimize(\+ id +\, event)' +onmouseover=\$(' + id + _minimize').className = $(' + id + _minimize').className + '_hover';\ +onmouseout=\$(' + id + _minimize').className = $(' + id + _minimize').className.sub('_hover','');\ /div : ; maxDiv = this.options.maximizable ? div class='+ className + _maximize' id='+ id +_maximize' onclick='Windows.maximize(\+ id +\, event)' +onmouseover=\$(' + id + _maximize').className = $(' + id + _maximize').className + '_hover';\ +onmouseout=\$(' + id + _maximize').className = $(' + id + _maximize').className.sub('_hover','');\ /div : ; } else { closeDiv = this.options.closable ? div class='+ className +_close' id='+ id +_close' onclick='Windows.close(\+ id +\, event)' /div : ; minDiv = this.options.minimizable ? div class='+ className + _minimize' id='+ id +_minimize' onclick='Windows.minimize(\+ id +\, event)' /div : ; maxDiv = this.options.maximizable ? div class='+ className + _maximize' id='+ id +_maximize' onclick='Windows.maximize(\+ id +\, event)' /div : ; }
Re: [Proto-Scripty] multipart/form-data upload via ajax
It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/v220/simpledemo/index.php. But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] multipart/form-data upload via ajax
It is possible but you have to realize it will only work on browsers that have the FileAPI available - Chrome/Firefox/Safari new Ajax.Request(fileupload.php?filename=myfile,{postBody:$(inputfield).files[0]}); will post the contents of the file to fileupload.php then you can use file_get_contents(php://input); to get the contents of the file and the filename will be $_GET['filename'] Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:27 PM, fntzr fantaz...@gmail.com wrote: It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/**v220/simpledemo/index.phphttp://demo.swfupload.org/v220/simpledemo/index.php . But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/**FileAPI/#FileReader-interfacehttp://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@** googlegroups.com prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+** unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] multipart/form-data upload via ajax
On Jan 9, 2013, at 3:45 PM, Jason Westbrook wrote: It is possible but you have to realize it will only work on browsers that have the FileAPI available - Chrome/Firefox/Safari new Ajax.Request(fileupload.php?filename=myfile,{postBody:$(inputfield).files[0]}); will post the contents of the file to fileupload.php then you can use file_get_contents(php://input); Note that this style of upload will not have the same security treatment by PHP as the $_FILES superglobal variable, and move_uploaded_file() and friends will not be active for it either. This can become an awful security hole if you aren't careful. to get the contents of the file and the filename will be $_GET['filename'] If you want to use the normal upload mechanism, you can use a keyhole iframe as the target in your form action to post your file contents normally, and a callback function in the window scope of the containing page to signal back your updates. It looks like Ajax, but it's really just a multipart form post. Walter Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:27 PM, fntzr fantaz...@gmail.com wrote: It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/v220/simpledemo/index.php. But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] multipart/form-data upload via ajax
Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:55 PM, Walter Lee Davis wa...@wdstudio.comwrote: On Jan 9, 2013, at 3:45 PM, Jason Westbrook wrote: It is possible but you have to realize it will only work on browsers that have the FileAPI available - Chrome/Firefox/Safari new Ajax.Request(fileupload.php?filename=myfile,{postBody:$(inputfield).files[0]}); will post the contents of the file to fileupload.php then you can use file_get_contents(php://input); Note that this style of upload will not have the same security treatment by PHP as the $_FILES superglobal variable, and move_uploaded_file() and friends will not be active for it either. This can become an awful security hole if you aren't careful. Agreed to get the contents of the file and the filename will be $_GET['filename'] If you want to use the normal upload mechanism, you can use a keyhole iframe as the target in your form action to post your file contents normally, and a callback function in the window scope of the containing page to signal back your updates. It looks like Ajax, but it's really just a multipart form post. Walter Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:27 PM, fntzr fantaz...@gmail.com wrote: It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/v220/simpledemo/index.php. But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.