]> git.mxchange.org Git - friendica.git/blobdiff - js/filebrowser.js
Merge pull request #2144 from fabrixxm/quattro
[friendica.git] / js / filebrowser.js
index 66db2833c3071b0e8d27cb5bc06579babc30db05..78cee0e77ed8f7349d4ca434ea60a338cc4e859e 100644 (file)
@@ -1,7 +1,7 @@
 /**\r
  * Filebrowser - Friendica Communications Server\r
  *\r
- * Copyright (c) 2010-2013 the Friendica Project\r
+ * Copyright (c) 2010-2015 the Friendica Project\r
  *\r
  * This program is free software: you can redistribute it and/or modify\r
  * it under the terms of the GNU Affero General Public License as published by\r
  *\r
  * To load filebrowser in colorbox, call\r
  *\r
- *     $.colorbox({href: ulr, iframe:true,innerWidth:'500px',innerHeight:'400px'})\r
+ *      Dialog.doImageBrowser(eventname, id);\r
  *\r
- * where url is:\r
+ * or\r
  *\r
- *             <baseurl>/fbrowser/<type>/?mode=minimal[#<eventname>-<id>]\r
+ *      Dialog.doFileBrowser(eventname, id);\r
+ *\r
+ * where:\r
  *\r
- *             baseurl: baseurl from friendica\r
- *             type: one of "image", "file"\r
  *             eventname: event name to catch return value\r
  *             id: id returned to event handler\r
  *\r
- *     When user select an item, an event in fired in parent page, on body element\r
- *     The event is named\r
+ * When user select an item, an event in fired in parent page, on body element\r
+ * The event is named\r
  *\r
  *             fbrowser.<type>.[<eventname>]\r
  *\r
- *     with params:\r
+ * <type> will be one of "image" or "file", and the event handler will\r
+ * get the following params:\r
  *\r
  *             filemane: filename of item choosed by user\r
  *             embed: bbcode to embed element into posts\r
- *             id: id from url\r
+ *             id: id from caller code\r
  *\r
- *  example:\r
+ * example:\r
  *\r
- *     // open dialog for select an image for a textarea with id "myeditor"\r
- *             var id="myeditor";\r
- *             $.colorbox({href: baseurl + "/fbrowser/image/?mode=minimal#example-"+id, iframe:true,innerWidth:'500px',innerHeight:'400px'})\r
+ *             // open dialog for select an image for a textarea with id "myeditor"\r
+ *             var id="myeditor";\r
+ *             Dialog.doImageBrowser("example", id);\r
  *\r
  *             // setup event handler to get user selection\r
  *             $("body").on("fbrowser.image.example", function(event, filename, bbcode, id) {\r