| View previous topic :: View next topic |
| Author |
Message |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 16:08 Post subject: [plugin] jQuery Datepicker Plugin |
|
|
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 |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 17:17 Post subject: |
|
|
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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
|
| Back to top |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 17:48 Post subject: |
|
|
I'll check into it and report back _________________ See the Sites in in Venice |
|
| Back to top |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 18:21 Post subject: |
|
|
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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 18:27 Post subject: |
|
|
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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 18:32 Post subject: |
|
|
| 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.
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 |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 18:39 Post subject: |
|
|
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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 18:42 Post subject: |
|
|
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:
Good luck _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net |
|
| Back to top |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 18:58 Post subject: |
|
|
Ok, it works just perfect at your test site 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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 19:04 Post subject: |
|
|
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 |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Thu Jan 22, 2009 19:32 Post subject: |
|
|
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 |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Thu Jan 22, 2009 19:38 Post subject: |
|
|
Thanks for the effort...
I'll change the priorities _________________ See the Sites in in Venice |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
|
| Back to top |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Fri Jan 23, 2009 1:37 Post subject: |
|
|
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 |
|
 |
|