]> source.dussan.org Git - nextcloud-server.git/commitdiff
Renamed current placeholder jquery plugin to imageplaceholder
authorVincent Petry <pvince81@owncloud.com>
Wed, 23 Oct 2013 14:47:25 +0000 (16:47 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 23 Oct 2013 14:47:25 +0000 (16:47 +0200)
This is to prevent conflicts with jquery libs that handle text
placeholders in IE8

core/js/jquery.avatar.js
core/js/placeholder.js

index 0006810172668fb4bf9d34bce83707dc64155d37..dbab032b971ff025d82d6e85bdc8acb3428c2119 100644 (file)
@@ -60,7 +60,7 @@
                        if (typeof(this.data('user')) !== 'undefined') {
                                user = this.data('user');
                        } else {
-                               this.placeholder('x');
+                               this.imageplaceholder('x');
                                return;
                        }
                }
@@ -76,9 +76,9 @@
                                if (typeof(result) === 'object') {
                                        if (!hidedefault) {
                                                if (result.data && result.data.displayname) {
-                                                       $div.placeholder(user, result.data.displayname);
+                                                       $div.imageplaceholder(user, result.data.displayname);
                                                } else {
-                                                       $div.placeholder(user);
+                                                       $div.imageplaceholder(user);
                                                }
                                        } else {
                                                $div.hide();
index ee2a8ce84c42b1fa0996abe6fc82fbc3492d8d5a..47cff780d2f76130f151cc367a254caa45bd85b8 100644 (file)
@@ -30,7 +30,7 @@
  *
  * And call this from Javascript:
  *
- * $('#albumart').placeholder('The Album Title');
+ * $('#albumart').imageplaceholder('The Album Title');
  *
  * Which will result in:
  *
@@ -38,7 +38,7 @@
  *
  * You may also call it like this, to have a different background, than the seed:
  *
- * $('#albumart').placeholder('The Album Title', 'Album Title');
+ * $('#albumart').imageplaceholder('The Album Title', 'Album Title');
  *
  * Resulting in:
  *
@@ -47,7 +47,7 @@
  */
 
 (function ($) {
-       $.fn.placeholder = function(seed, text) {
+       $.fn.imageplaceholder = function(seed, text) {
                // set optional argument "text" to value of "seed" if undefined
                text = text || seed;