Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #170. Cheerz!

  • Loading branch information...
commit 894bcb545ac19ec1c34877c47fc269c06069430d 1 parent f12e84b
@Tudmotu Tudmotu authored
View
2  help/examples/13-fileManager.html
@@ -42,7 +42,7 @@
</head>
<body><div class="container">
<h1>jWYSIWYG</h1>
- <h2>Example: Basic</h2>
+ <h2>Example: File Manager</h2>
<textarea id="wysiwyg" rows="5" cols="80"></textarea>
<hr/>
View
2  plugins/fileManager/wysiwyg.fileManager.css
@@ -27,6 +27,8 @@ div.wysiwyg ul.toolbar li.fileManager { background: url('icon.png'); }
/*
* Below is the list of file-types classes.
*/
+
+ /* This REALLY needs to become a sprite */
.wysiwyg-files-wrapper li.wysiwyg-files-3gp { background: url(images/film.png) left top no-repeat; }
.wysiwyg-files-wrapper li.wysiwyg-files-afp { background: url(images/code.png) left top no-repeat; }
.wysiwyg-files-wrapper li.wysiwyg-files-afpa { background: url(images/code.png) left top no-repeat; }
View
9 plugins/wysiwyg.fileManager.js
@@ -80,7 +80,7 @@
if ($(this).hasClass("wysiwyg-files-dir")) {
$(".wysiwyg-files-wrapper").find("input[name=url]").val('');
$('#wysiwyg-files-list-wrapper').addClass("wysiwyg-files-ajax");
- $('#wysiwyg-files-list-wrapper').html('');
+ $('#wysiwyg-files-list-wrapper').html("");
self.loadDir($(this).attr("rel"), function (newFileList) {
$('#wysiwyg-files-list-wrapper').html(newFileList);
$('#wysiwyg-files-list-wrapper').removeClass("wysiwyg-files-ajax");
@@ -89,6 +89,11 @@
$(this).css("backgroundColor", "#BDF")
$(".wysiwyg-files-wrapper").find("input[name=url]").val($(this).attr("rel"));
}
+ /* Need to add functionality for a "select" button that will trigger a callback function:
+ * $.wysiwyg.fileManager.setAjaxHandler('...').init(function (selected_file) {
+ * ....
+ * });
+ */
});
},
close: function () {
@@ -117,7 +122,7 @@
var treeHtml = '<ul class="wysiwyg-files-list">';
if (self.curDir !== "/") {
var prevDir = self.curDir.replace(/[^\/]+\/?$/, '');
- treeHtml += '<li class="wysiwyg-files-dir wysiwyg-files-dir-prev" rel="'+prevDir+'" title="Go to previous directory">'+prevDir+'</li>';
+ treeHtml += '<li class="wysiwyg-files-dir wysiwyg-files-dir-prev" rel="'+prevDir+'" title="Go to previous directory">'+self.curDir+'</li>';
}
$.each(json.data.directories, function(name, dirPath) {
treeHtml += '<li class="wysiwyg-files-dir" rel="'+dirPath+'">'+name+'</li>';
Please sign in to comment.
Something went wrong with that request. Please try again.