[Proto-Scripty] JSON, ASP.NET and Date's

2008-09-11 Thread Kruncher

Hi guys,

I am using the ASP.NET class DataContractJsonSerializer to transfer
information via the Prototype Ajax.Request and the server. Generally
this is working fantastically, however there is one problem, and I am
unsure whether it is something that I am doing wrong, or whether it is
something which is not yet available within the Prototype framework.

The ASP.NET date/time object generates the following JSON:
 dateModified:\/Date(1220453756681+0100)\/

Which Prototype appears to interpret as:
 dateModified: /Date(1220453756681+0100)/

Looking through the Prototype API documentation I found that it
converts JavaScript date/time objects into the form -mm-
ddThh:mm:ssZ but it does not seem to be able to automatically reverse
this back into a JavaScript date time object.

Any suggestions would be fantastic!
Lea Hayes

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Where is the source?

2008-09-11 Thread Richard Quadling

2008/9/10 Lighthouse [EMAIL PROTECTED]:
 // Add your reply above here
 ==
 John-David Dalton updated this ticket at September 10, 2008 21:13

 *no worries ya thats the trunk (its going through some reorganization but the 
 fix should be in the events.js)
 

 State: resolved
 Milestone: 1.6.0.3
 View this ticket online: 
 http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-pointer-function-on-ie.
 Stop being notified of this ticket's changes: 
 http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-pointer-function-on-ie/watch
 Update your Profile: http://prototype.lighthouseapp.com/profile


According to http://github.com/sstephenson/prototype/tree/master

git clone git://github.com/sstephenson/prototype.git

is the command to retrieve the source, but I don't seem to have
anything different from at least 25th July 2008.

In looking at the source at
http://github.com/sstephenson/prototype/tree/master/src this confirms
my suspicion.

Where is the source that you all actively write to?

Regards,

Richard.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Disabling Scriptaculous autocomplete

2008-09-11 Thread bluezehn

Since an autocompleter is just an object, then you can just store it
in a variable.
So when the checkbox is unchecked, you can just set the variable to
null and when it's checked again call the code to recreate the
checkbox over. This would be my basic approach but you'd have a few
issues with things like making sure listeners aren't added twice etc.
Best bet to have a look at the source and see how it runs.

On Sep 11, 8:04 am, Nithi [EMAIL PROTECTED] wrote:
 Hi,

 I have a question regarding disabling Scriptaculous autocomplete with
 a input checkbox. I want to disable autocomplete when the user
 unchecks the checkbox.

 I tried keeping a toggle variable and using it but I couldn't do it. I
 went through this PATCH link (http://dev.rubyonrails.org/ticket/7210)
 but couldn't get it working.

 Please suggest some method to disable the autocomplete request.
 Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Where is the source?

2008-09-11 Thread Richard Quadling

2008/9/11 T.J. Crowder [EMAIL PROTECTED]:

 Hey Richard,

 This is one of those rare situations where you're probably better off
 asking over in the core group's group (I'll provide the link although
 I'm sure you know it!):
 http://groups.google.com/group/prototype-core/topics

 FWIW,
 --
 T.J. Crowder
 tj / crowder software / com

 On Sep 11, 11:26 am, Richard Quadling [EMAIL PROTECTED]
 wrote:
 2008/9/11 bluezehn [EMAIL PROTECTED]:





  Not sure what you mean. If you just want to see prototype/
  scriptaculous' source, then since javascript is an interpreted
  language, by definition you already have it just by downloading it.

  On Sep 11, 10:36 am, Richard Quadling [EMAIL PROTECTED]
  wrote:
  2008/9/10 Lighthouse [EMAIL PROTECTED]:

   // Add your reply above here
   ==
   John-David Dalton updated this ticket at September 10, 2008 21:13

   *no worries ya thats the trunk (its going through some reorganization 
   but the fix should be in the events.js)
   

   State: resolved
   Milestone: 1.6.0.3
   View this ticket 
   online:http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-p
   Stop being notified of this ticket's 
   changes:http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-p...
   Update your Profile:http://prototype.lighthouseapp.com/profile

  According tohttp://github.com/sstephenson/prototype/tree/master

  git clone git://github.com/sstephenson/prototype.git

  is the command to retrieve the source, but I don't seem to have
  anything different from at least 25th July 2008.

  In looking at the source 
  athttp://github.com/sstephenson/prototype/tree/master/srcthisconfirms
  my suspicion.

  Where is the source that you all actively write to?

  Regards,

  Richard.
  --
  -
  Richard Quadling
  Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498r=213474731
  Standing on the shoulders of some very clever giants!

 Yep. You REALLY did miss the point of my question. I'm trying to find
 the uptodate trunk on github. I think I've got it, but with the
 event.js being updated to deal with the event pointer bug (again), I'm
 trying to find the update.

 --
 -
 Richard Quadling
 Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498r=213474731
 Standing on the shoulders of some very clever giants!
 


Doh!

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Drag and Drop between Lists

2008-09-11 Thread Chrigu

Hello

I just created a small sample with sortable list. The Sample can be
found at: http://www.i-cons.ch/sample/list/

Based on this sample I have two questions. I hope you are able to help
me.

1) I use 3 lists. I can drag and drop items from every list to the
others or within the list. This ist just perfect for list 1 and 2. But
list 3 sholud always stay the same. Even if i drag a item out of the
list, the item should stay in the list and a copy of the item should
be placed in one of the other lists. Is there a easy way for doing
this?

2) I like to get a clicked event only when teh element is not draged.
When i click to a list element i like to open another window or
something like a lightbox with more informations. How can i detect the
Click?

Thank you for your help
Chrigu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Where is the source?

2008-09-11 Thread bluezehn

Yep. You REALLY did miss the point of my question.

Erm. Um? Ok?

(wtf?lolzers!!!)

You're not the sharpest nor understanding tool in the box obviously.
Well I'm out of this thread since my presence is obviously not
appreciated.

On Sep 11, 1:33 pm, Richard Quadling [EMAIL PROTECTED]
wrote:
 2008/9/11 bluezehn [EMAIL PROTECTED]:



  I sincerely apologise for trying to help you. I will avoid this in the
  future.

 Erm. Um? OK?

 (wtf?)

 --
 -
 Richard Quadling
 Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498r=213474731
 Standing on the shoulders of some very clever giants!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Get value from table cell when table row have checkbox checked

2008-09-11 Thread Diogo Neves
Hi,
I think the easiest method is add an id in your td with value,

then do a
$$(.entries_list input:checked).each( function( elem ) {
  valor = $('value_' + $(elem).id).innerHTML;
  // Do stuff with it :P
});

On Thu, Sep 11, 2008 at 10:12 PM, Daniel Lopes [EMAIL PROTECTED]wrote:


 Hello, i'm trying create function that sum the content of td when
 other td in same tr has checkbox checked... i try use someting like $$
 (.entries_list input:checked) but return only input and not row or
 cell i want sum.


 table width=100%
  tr class=credit
tdinput id=entry_2 name=entry_2 type=checkbox
 value=1 //td
td class=desc Pagamento 2ª parcela Inpacto
 Produções/td
td class=category /td
td class=value id=value_entry_2850,00/td
tda href=/accounts/2/entries/2Exibir/a/td
tda href=/accounts/2/entries/2/editEditar/a/td
  /tr
  tr class=debit category_2
tdinput id=entry_3 name=entry_3 type=checkbox
 value=1 //td
td class=desc Pagamento/td
td class=category retirada/td
td class=value id=value_entry_3-20,00/td
tda href=/accounts/2/entries/3Exibir/a/td
tda href=/accounts/2/entries/3/editEditar/a/td
  /tr
/table

 I just want sum value cell when checkbox's on the same line is
 checked.

 Someone can help?
 Many thanks.

 

-- 
Thanks,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How to handle non-JavaScript browsers when using Ajax.Updaters for content

2008-09-11 Thread dustin

That seems like it would work nicely, but doesn't it pretty much
negate the gracefulness of using Ajax to insert content into a DIV
(the grace that allowed me to stop maintaining clumsy header.php,
footer.php, navbar.php, etc, and piecing together based on the user-
agent type)?

On Sep 11, 3:41 pm, Ken Snyder [EMAIL PROTECTED] wrote:
 Dustin S wrote:
  I've got a homepage right now with a few links that each use an
  Ajax.Updater to XHR-in some content that gets shoved into the middle
  of my page. I'm wondering how to gracefully handle two things:

  (1) Users with normal browsers (i.e. JavaScript capable) who want to
  direct link to some content on my page,http://www.foo.com/#direct_content

  (2) How to properly handle non-JS browsers and still allow them to be
  able to see the content as well.

  The web 2.0 solution I've had so many people try to sell to me so
  far is to use careful display:none; and show/hide combinations to
  just show and hide my content, with it all actually on my page. This
  would mean I'm not XHRing the stuff in from somewhere else, though,
  and the end result is an extremely heavyweight page (unacceptable).

  -d

 We were just discussing this type of unobtrusiveness in the office.  :)
 For your case, you may want to consider using frames or an iframe. If
 your system gets any more complicated or you want to do something like
 modal windows, the following approach works well:

 div id=middlePageContent/div
 a href=page/with/content.php class=ajaxView some content/a

 script
 $$('a.ajax').invoke('observe', 'click', function(event) {
   var element = event.element();
   var url = element.href + (element.href.indexOf('?')  -1 : '' : '?')
 + 'ajax=1';
   new Ajax.Updater('middlePageContent', url);
   event.stop();});

 /script

 page/with/content.php:
 ?php
 //..
 if ($_REQUEST['ajax'] != 1) include 'htmlHeader.php';
 echo $pageContent;
 if ($_REQUEST['ajax'] != 1) include 'htmlFooter.php';
 ?

 You basically code the pages to work without JavaScript, but then
 observe each a with a certain class. The observer stops the default
 action (going to the page) and runs an Ajax.Updater request.  The server
 side page then just needs to skip output of the html header and footer
 if the request is from an XMLHttpRequest.

 - Ken Snyder
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Are events fired after an LivePipe modals are loaded?

2008-09-11 Thread Dustin S
I found another way to make this work too. It turns out the solution was in
the LivePipe system, since it provides an afterOpen option to any object
you create, which is just like Prototype's onComplete:

 57 var w = new
Control.Modal(container,Object.extend({
 58 className: 'window_modal',
 59 closeOnClick: window_close,
 60 overlayOpacity: 0.75,
 61 fade: true,
 62 afterOpen: function(){
 63
Form.focusFirstElement($('signup_form'));
 64 }
 65 },options || {}));


On Fri, Sep 5, 2008 at 8:19 AM, Diodeus [EMAIL PROTECTED] wrote:


 form Tags must be added to the DOM in order for you to attach events
 to them. Shoving them into innerHTML will not work.

 To get around this, you can either have form tag in the original
 document before the XHR request is called, then put the contents of
 the form   inside the existing form tag, or you can add the form
 tag dynamically using new Element.

 On Sep 4, 11:07 pm, dustin [EMAIL PROTECTED] wrote:
  I know this seems like a LivePipes question, but I'm really trying to
  figure out how Prototype behaves here.
 
  I'm using the following line of code to create a modal dialog with a
  signup form in it:
 
  code
  var start_now_modal = new Control.Modal($('start_now_modal')
  /code
 
  The form that exists entirely in the inserted HTML (meaning the form
  tag gets pulled in from an external file, presumably with some
  underlying XHR request). Currently I have the this code at the very
  end of the HTML that gets inserted: scriptstartNowModalLoaded()/
  script to essentially simulate a dom:loaded event for my modal
  box. I assume that when the new HTML gets inserted
  startNowModalLoaded() is executed last and thus I can assume all my
  new elements exist in the DOM.
 
  My goal is to use the Form.focusFirstElement($('signup_form'))
  method, but it isn't working at all. If I attach that command to a
  different event (other than load), like, onChange for one of the
  dropdowns in my form, then things work as expected (i.e. when you
  change the dropdown then the focus goes back to the first element of
  the form).
 
  I assume that my attempt to get the initial focus working isn't
  succeeding because the new content isn't fully loaded when I make my
  call to Focus, but I'm not sure how else I can wait for things to
  load. Hence my question: is there a XHR content is done loading
  event that I can wait for, instead of just calling
  startNowModalLoaded() at the end of my HTML?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---