Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Development / DHTML Js Calendar

12>>>

A friendly GUI to fill date fields

donP
#1 2010-05-02 20:21
I think our Cotonti CMF must achieve a most friendly GUI in many parts (mostly users side).
A first step would be this great DHTML Calendar to fill date fields everywhere (pages, user profiles and so on).
in [color=#729FCF][b]BLUES[/b][/color] I trust
booka
#2 2010-05-02 20:38
donP
#3 2010-05-02 20:54
You surely meant http://jqueryui.com/demos/datepicker/ ;)
Good, and using jQuery...
But the problem is the integration with Cotonti, 'cause, actually, we have FIVE (!!!) select fields to record ONE date field!
We would hardly change core and .tpl files... :/
in [color=#729FCF][b]BLUES[/b][/color] I trust
GHengeveld
#4 2010-05-03 17:51
# donP : But the problem is the integration with Cotonti, 'cause, actually, we have FIVE (!!!) select fields to record ONE date field!
We would hardly change core and .tpl files... :/
That would be easily solved by supporting two formats: seperate fields (existing) and a combined field, allowing for developers to choose between input formats.

I've found that using strftime and strptime are the easiest and most flexible way to do this. Of course parsing dates for display will still require a custom function for localisation.

I'll add a ticket for this.
donP
#5 2010-05-03 19:01
Thank you very much! :)
in [color=#729FCF][b]BLUES[/b][/color] I trust
esclkm
#6 2010-05-03 19:29
I think. It is not a problem,
Your Super Calendars are also Js - I think it is very for plugs, templates, but not core! - http://trac.cotonti.com/ticket/366
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
GHengeveld
#7 2010-05-03 19:41
Thinking of it, we can already use the datepicker with some custom scripting. See original datepicker documentation.

Still, I've created a ticket since it will allow for more flexibility in general (entering a date as plaintext for example). See ticket 483.
donP
#8 2010-05-03 20:15
Could you show us the simpler manner to implemet datepicker from now? I saw this code:
// Update three select controls to match a datepicker selection 
function updateSelected(dates) { 
    $('#selectedMonth').val(dates.length ? dates[0].getMonth() + 1 : ''); 
    $('#selectedDay').val(dates.length ? dates[0].getDate() : ''); 
    $('#selectedYear').val(dates.length ? dates[0].getFullYear() : ''); 
    checkLinkedDays(); // Disable invalid days 
} 
 
$('#selectedPicker').datepick({ 
    minDate: '01/01/2001', maxDate: '12/31/2010', 
    alignment: 'bottomRight', onSelect: updateSelected, 
    showTrigger: '#calImg'}); 
 
// Update datepicker from three select controls 
$('#selectedMonth,#selectedDay,#selectedYear').change(function() { 
    $('#selectedPicker').datepick('setDate', new Date( 
        $('#selectedYear').val(), $('#selectedMonth').val() - 1, 
        $('#selectedDay').val())); 
});
but where and how can we insert that in Cotonti without core hacks?

Adn... why you assigned the ticket to Renaissance?
in [color=#729FCF][b]BLUES[/b][/color] I trust

This post was edited by donP (2010-05-03 20:23, 12 years ago)
esclkm
#9 2010-05-03 21:02
http://trac.cotonti.com/ticket/483 - Koradhil - Do you see cotonti history? What is it? You think - you make. it is just very bad manner in my mind.

I think may be not bad way is general input for date - but what do you say about date format? or about how to check this string for the right value
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
Kort
#10 2010-05-03 22:35
The whole discussion is strange. Why would anyone need to integrate a calendar or a datepicker? To input a birthday in a user-friendly manner? Or play with "posted at" and "valid through" page fields which do not work properly -- and isn't it what has to be fixed first? Integrating 3rd party scripts is a job for plugin-makers. Ask for it in the bazaar. The system development is something different.
Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
donP
#11 2010-05-04 02:20
@esclklm and Kort:

It's mostly this (your) way of thinking and develop Cotonti that makes it so obscure and remote to simple users.
I'm a webmaster, I'm quite skilled to write my contents as I want, also directly in HTML, I'm clever enough to mantain my personal website also directly making changes inside PHP code and core-hacking the origninal script... but, if you want to setup a website and leave it for a not very expert client, or just allow everyone to participate to a website by inserting contents, Cotonti is actually the less intuitive interface we can find among CMS around!

Kort:
Integrating 3rd party scripts is a job for plugin-maker
Yes, but plugin makers must have te ability to interact with a simple code, not a cryptic core so difficult to interface! (as a date-insert with FIVE select fields)
in [color=#729FCF][b]BLUES[/b][/color] I trust
Kort
#12 2010-05-04 03:01
Cotonti is a framework rather than a ready-made solution. We've built around 20 seditio- and cotonti-based websites, and no singe (simple?) user has ever told us that is was obscure or remote. Stuffing it with calendars and alike a. won't make it user-friendly b. will make it less stable c. will make it big d. will make it prone to errors (add more as needed).
As regards calendars/datepickers, manipulating dates is not something you do often with Cotonti. I'd even say, you do not normally manipulate dates in Cotonti. But if you do need it, make a plugin and do not request immediate core adjustment.
Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
ez
#13 2010-05-04 04:31
Let's work on a solution that is good for all, it is better then filling this topic..
I agree with a lot off arguments above... (there are pro's and con's for everything)

I too think we could use some nice things like datepickers and other stuff, but it should be like a piece off Lego (a building block)

I am a very strong believer of a small core and plugins to expand/extend to the users needs...
I even think that most parts should be plugins... (but that is just my opinion)

Maybe the best solution is solid core components that are useable/flexible for integrating all kinds
off nice GUI stuff. Let's think about that....

Personally I haven't looked at things like GUI (JS)datepickers, but now that this discussion is there... hmmmmm I would love to see them.. (but not risking something..)

So, what solution should/can we make?
==- I say: Keep it EZ -==
donP
#14 2010-05-04 05:01
Kort:
manipulating dates is not something you do often with Cotonti
Ah no?! Everytime a user wants to insert a New in homepage and decide when that New has to appear and when would diappear... this is the most important activity for a frontpage site with many contibutors writing contents. At least 10-15 times a day!

Me and Koradhil were only saying that, for implementing plugins (I can make my own like I've ever done, from LDU 600, I don't need a ready-made solution) we have to make the core able to hook them...
I was remarking that, FOR EXAMPLE, the actual page-date/begin/expire is very hard to integrate with a plugin (not only a JsDatepicker) if we have FIVE select-fields to set a single date!

ez:
So, what solution should/can we make?
Koradhil's one:
Koradhil:
supporting two formats: seperate fields (existing) and a combined field, allowing for developers to choose between input formats.
in [color=#729FCF][b]BLUES[/b][/color] I trust
booka
#15 2010-05-04 05:11
I think I can agree with EZ...

I understand that core development is something away from User Friendly religion, but it must be Plugin-maker Friendly. All modifications, like date pickers or something must be done without changing of the core.

From the other hand - most of developers told about how to achieve more clients, how to apply our CMS to more sites. To do that first off all it must be user friendly, it must support auto installation like Windows or Mac installer, it must be flexible and support things that didn't require any coding just from the box: Galleries, Blogs, Forums, Forms which are not required any reloads etc. And for sure it must has a lot (about 10 to 20) perfect WEB 2.0 skins just out from the box. Look at this site - even it doesn't looks good, Neocrome.net looks much better for now.

I'm not a perfect coder and I'm not perfect skinmaker - so you can freely forget about my thoughts. But for example - right now I need to start new ecommerce project. I can install Magento - spent few month to optimize it for local realms or find some coder to do that. But I can go to WebAssyst Shop-Script - it has less functionality - but it is easy, it has a lot of user friendly things and I can just download and begin to use it. Yes - it will cost some money, but how much money I can loose while playing with heavy code even if it can provide me with more functionality?

Добавлено 3 Минуты спустя:

I now Cotonti since LDU... Totally from my point of view (user) - nothing changed in general. It still looks like something made on kneels - it has a potential and can be used to run GREAT sites, but it is not something attractive from marketing point of view. Looks like it lives for itself - to be fastest, with minimum weight, with big potential, but...
booka

12>>>