1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    70
    Vote Rating
    0
    NeonMonk is on a distinguished road

      0  

    Default Ext.ux.form.ClockField -- TimeField with analog clock picker

    Ext.ux.form.ClockField -- TimeField with analog clock picker


    Hey guys,

    I've just successfully ported over and improved NoGray's Mootools TimePicker by Wesam Saif (released under MIT-style license)

    Config options:

    imagesPath: defaults to "Ext.ux.form.ClockField/images"
    clockBgColor: defaults to "white"
    clockBorder: defaults to "1px solid lightgrey"
    format: defaults to "g:i A"

    If you find any bugs/make any improvements or fixes please post back to this thread.

    Demo
    Attached Images
    Attached Files

  2. #2
    Ext User
    Join Date
    Dec 2007
    Posts
    13
    Vote Rating
    0
    worthy is on a distinguished road

      0  

    Default Wrong demo address

    Wrong demo address


    I don't think that http://localhost/ext/... is a valid demo website address.

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    70
    Vote Rating
    0
    NeonMonk is on a distinguished road

      0  

    Default


    Updated. Thanks.

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    Hi, looks great.
    Doesn't work in IE 7, and it doesnt have a way to close. Should close on enter and maybe add a x to close it or click outside of clock to close.

    Thanks,
    Marty

  5. #5
    Ext User
    Join Date
    Jan 2008
    Posts
    5
    Vote Rating
    0
    dajianshi is on a distinguished road

      0  

    Default


    Great! but the Hour arm not perform good, say not right position

  6. #6
    Ext User
    Join Date
    Jan 2009
    Posts
    7
    Vote Rating
    0
    AguilaLibre is on a distinguished road

      0  

    Default this.hourHand is undefined

    this.hourHand is undefined


    Hello,

    Im trying to use your clockfield but for some reason im getting the following error: "this.hourHand is undefined" Im using the code exactly as it is, and I already check the script and nothing seems to be bad written or coded..

    Thanks for your support in advance...

  7. #7
    Ext User
    Join Date
    Aug 2008
    Posts
    6
    Vote Rating
    0
    friendlymahi is on a distinguished road

      0  

    Default this.hourHand is null or not an object

    this.hourHand is null or not an object


    Even I get the same issue..Can u pls let us know what to do..

    Many Thanks,
    Mahi

  8. #8
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    It worked out of the box for me on FF3. I can't say the same for IE7, but I assume your errors are for FF, no? Did you run the code as is?

  9. #9
    Ext User
    Join Date
    Aug 2008
    Posts
    6
    Vote Rating
    0
    friendlymahi is on a distinguished road

      0  

    Default i ran on ie6

    i ran on ie6


    hii

    I ran ur code as is in IE6... i got that error...

  10. #10
    Sencha User
    Join Date
    Sep 2009
    Posts
    3
    Vote Rating
    0
    xiaojun777 is on a distinguished road

      0  

    Default fix two bug.

    fix two bug.


    follow code fix in IE error.

    clickAngle = function(pnt, coord){
    var c_x = coord.width/2;
    var c_y = coord.height/2;
    var x = pnt.x - coord.left;
    if (window.scrollX){
    x += window.scrollX;
    }

    var y = pnt.y - coord.top;
    if (window.scrollY){
    y += window.scrollY;
    }
    var t_x = c_x;
    var t_y = y;
    var CA = t_x - x;
    var CO = t_y - c_y;
    var AO = Math.sqrt(Math.pow(CA, 2) + Math.pow(CO, 2));
    var ang = Math.round((Math.acos((Math.pow(Math.abs(CA), 2) - Math.pow(Math.abs(AO), 2) - Math.pow(CO, 2))/(2 * CO * AO))) * 180/Math.PI);
    if (x < c_x) { ang = 360 - ang; }
    return ang;
    }

    follow code fix error:can't get the clock hand Accurately.
    example:hour is 0 and minute is 15,It is Difficult to get the hour clock hand.


    this.clockContainer.on("mousedown", function(e){
    this.moveEl['move'] = true;
    this.moveEl['originalTime'] = this.time;
    var el = Ext.get(e.target);
    var coord = this.getCoords();
    var ang = this.clickAngle({x:e.xy[0], y:e.xy[1]}, coord);
    var h_ang = (this.time.hour%12) * 30;
    var m_ang = this.time.minute * 6;
    var middle_ang_first = (h_ang + m_ang) / 2;
    var middle_ang_second = (middle_ang_first + 180) % 360;
    var middle_ang_max = Math.max(middle_ang_first,middle_ang_second);
    var middle_ang_min = Math.min(middle_ang_first,middle_ang_second);
    this.moveEl['coord'] = coord;
    if ((ang >= 0 && ang < middle_ang_min) || (ang > middle_ang_max && ang < 360) ) {
    if ((h_ang >= 0 && h_ang < middle_ang_min) || (h_ang > middle_ang_max && h_ang < 360) ){
    this.moveEl['el'] = "hour";
    }else{
    this.moveEl['el'] = "minute";
    }
    } else if(ang >= middle_ang_min && ang < middle_ang_max ) {
    if (h_ang >= middle_ang_min && h_ang < middle_ang_max){
    this.moveEl['el'] = "hour";
    }else{
    this.moveEl['el'] = "minute";
    }
    } else {
    if (el.getStyle("background-image").indexOf(this.hourHandImage) != -1) {
    this.moveEl['el'] = "hour";
    }
    else {
    this.moveEl['el'] = "minute";
    }
    }
    },this);

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi