[plugin] jQuery Datepicker Plugin
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions
View previous topic :: View next topic  
Author Message
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 16:08    Post subject: [plugin] jQuery Datepicker Plugin Reply with quote

Today I proudly present my latest plugin. It's a calendar type date picker for use in the Write / Edit section. There is a JavaScript thingy that's ugly and that had a bug. Because it's the last time you see it: here's an image:



The Datepicker I offer in this plugin is much nicer. Also it's relatively clevr. It knows your Locale and will paste the date in that Locale. Furthermore it's automagically translated if you have the proper language files installed. Here's a French version of the new jQuery Datepicker Plugin:



All you have to do is download, unzip and install. There are no options.

Download: jquery_datepicker_plugin-0.2.zip

Have fun

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net


Last edited by Afwas on Thu Jan 22, 2009 23:57; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 17:17    Post subject: Reply with quote

I must have a script conflict. ( Probably one of Yabba's Admin tricks )
Your very attractive DatePicker doesn't show up at all, and in fact neither does the default one!!

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 17:47    Post subject: Reply with quote

Hi John,

A conflict is unlikely. Do you have FireBug installed (FF plugin). That will show you what's going on.

Good luck

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 17:48    Post subject: Reply with quote

I'll check into it and report back
_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 18:21    Post subject: Reply with quote

Thanks for the login Afwas.
Alas... there is no Issue Date: field at all when I viewed your "test" blog "write" screen. Note the following from your write screen..



Firefox 3 and Safari on OS X 10.5.6

On my installation, I get the Issue Date field at least.

Discovery!!!

In my Admin, when I click on the text,Issue Date: or the input field I get the following unskinned popup!!!


_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 18:27    Post subject: Reply with quote

You're nearly there.
Try a fresh upload in case you missed a couple of files.
Then view the source of that page. It should read:
PHP:
    <link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.core.css" />

    <
link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.theme.css" />
    <
link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.datepicker.css" />
    <
script type="text/javascript" src="/plugins/jquery_datepicker_plugin/jquery-1.3.1.js"></script>
    <script type="text/javascript" src="/plugins/jquery_datepicker_plugin/ui.core.min.js"></script>
    <script type="text/javascript" src="/plugins/jquery_datepicker_plugin/ui.datepicker.min.js"></script>
    <script type="text/javascript">
        jQuery(function() {
            jQuery("#anchor_item_issue_date").hide();
            jQuery("#item_issue_date").datepicker( { onSelect: function(){jQuery('#edit_date').attr("checked", "checked");}, dateFormat: 'dd/mm/y', 
            monthNames: ['January','February', 
                'March', 'April', 'May', 
                'June', 'July', 'August',
                'September', 'October', 
                'November', 'December'],
            dayNamesMin:  ['Sun', 'Mon', 'Tue',
                'Wed', 'Thu', 'Fri', 
                'Sat'] });
        });
    </script> 

just before </head>

Good luck

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 18:32    Post subject: Reply with quote

John wrote:
Thanks for the login Afwas.
Alas... there is no Issue Date: field at all when I viewed your "test" blog "write" screen. Note the following from your write screen..



Firefox 3 and Safari on OS X 10.5.6

This was stupid. The user was administrator but had Level 1 and you were trying to edit a post by admin who has Level 10.

Rolling Eyes

You can try again.
Good luck

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 18:39    Post subject: Reply with quote

The Datepicker source code is spot on..
Code:
<link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.core.css" />
   <link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.theme.css" />
   <link rel="stylesheet" type="text/css" href="/plugins/jquery_datepicker_plugin/themes/redmond/ui.datepicker.css" />
   <script type="text/javascript" src="/plugins/jquery_datepicker_plugin/jquery-1.3.1.js"></script>
   <script type="text/javascript" src="/plugins/jquery_datepicker_plugin/ui.core.min.js"></script>
   <script type="text/javascript" src="/plugins/jquery_datepicker_plugin/ui.datepicker.min.js"></script>

   <script type="text/javascript">
      jQuery(function() {
         jQuery("#anchor_item_issue_date").hide();
         jQuery("#item_issue_date").datepicker( {
            onSelect: function(){jQuery('#edit_date').attr("checked", "checked");},
            dateFormat: 'dd.mm.y',
            monthNames: ['January','February',
               'March', 'April', 'May',
               'June', 'July', 'August',
               'September', 'October',
               'November', 'December'],
            dayNamesMin:  ['Sun', 'Mon', 'Tue',
               'Wed', 'Thu', 'Fri',
               'Sat']
         });
      });
   </script>


It's followed by your resize_admin scripts and Yabba's am_image_editor_plugin scripts before </head>

!!!

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 18:42    Post subject: Reply with quote

Ok, so a conflict after all. The other plugins load older versions of some jQ elements.
Open /jquery_datepicker_plugin/_jquery_datepicker.plugin.php and set:
PHP:
var $priority 99


Good luck

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 18:58    Post subject: Reply with quote

Ok, it works just perfect at your test site Smile and it's sweet as.

However it still appears "un styled" on my installation even after setting the priority to 99, reloading plugins, clearing pre rendered cache etc etc.

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 19:04    Post subject: Reply with quote

I can confirm the problem on my normal blog.The proposed solution doesn't seem to push the code down. $priority *should* do that.
I'll find a solution.

--F

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 19:32    Post subject: Reply with quote

I have good news and bad news,

The good news is that the conflict is with AM_Image_Ediitor. Luckily that one isn't released yet. Yabba has set it's priority to 100, so the 99 I proposed for jQuery_Datepicker wasn't enough. Solution: set the priority of AM_Image_Editor to 98 and taht for jQuery_Datepicker to 99. You can do so in the plugin's settings. No need for editing files.

The bad news is that the calendar displays to high in my normal blog. That's due to inline style by jQuery, It calculates the position of the date input textfield. However it is mistaken by all the other javaScript on that page. The textarea is moved around by all sorts of other items. I'll see if I can find a cure for that.

Good luck

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Thu Jan 22, 2009 19:38    Post subject: Reply with quote

Thanks for the effort...
I'll change the priorities

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Afwas
Forum helper

Joined: 03 Jan 2007
Posts: 3559
Reputation: 28.7Reputation: 28.7Reputation: 28.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 63

PostPosted: Thu Jan 22, 2009 23:56    Post subject: Reply with quote

Right,

Found the culprit in the jQuery plugin. Hacked my way through that, but now I can present a full working update.
The conflict with yabba's plugin(s) will be solved when he publishes.

Download: jquery_datepicker_plugin-0.2.zip

_________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Fri Jan 23, 2009 1:37    Post subject: Reply with quote

Ok, works just fine.
Note: Remember to delete the 2 at the end of the folder name when you unpack your zip
Quote:
jquery_datepicker_plugin 2


Thanks for the work.

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board