Jump to content

Hayri ASLAN

Moderators
  • Posts

    1578
  • Joined

  • Last visited

  • Days Won

    134

Posts posted by Hayri ASLAN

  1. http://hayriaslan.net/iis/UniNoty/UniNotyDemo.dll

    in here change type "confirmation"

     

    after that you will see buttons

    also

    in buttonclick event you will see

     

    buttonClicked, notyid : noty_4672009 buttonName=OkButton

     

    i defined buttons like that

    SetLength(UniNoty1.Buttons,2);
          UniNoty1.Buttons[0].cls:='primary';
          UniNoty1.Buttons[0].name:='OkButton';
          UniNoty1.Buttons[0].caption:='Ok';
          UniNoty1.Buttons[0].closeOnClick:=True;
    
          UniNoty1.Buttons[1].cls:='danger';
          UniNoty1.Buttons[1].name:='CloseButton';
          UniNoty1.Buttons[1].caption:='Close';
          UniNoty1.Buttons[1].closeOnClick:=True;
    
  2. Dear hakim,

     

    as i said yesterday, you will create function and this function will call ajaxevent.

     

    Like that :

    For example it is menu html:
    
    MenuHTML:='<div id=\"block_navigation\"><ul class=\"navigation\"><li> '+
       '<a href=\"#\" onclick=\"MyFunction(''111'');return false;\">Home</a></li>'+
      '<li><a class=\"block_navigation_submenu\" href=\"#\">Sliders <span class=\"span_main_links\">+</span></a>'+
      '<ul><li><a href=\"#\" onclick=\"MyFunction(''112'');return false;\">Level 1 </a></li><li><a href=\"#\">Level 1 </a></li></ul>'+
      '</ul></div>';
    This İs function for ajaxevent
    var
    data:TStringList;
    begin
      data:=TStringList.Create;
    
      data.Clear;
      data.Add('$(document).ready(function(){  ');
      data.Add(' window.MyFunction =  function MyFunction(a) { ');
      data.Add(Format('ajaxRequest(%s, "Menuclicked", ["menuid="+a]);',   [TForm(MyForm).Name+'.'+TUniHTMLFrame(self).Name]) );
      data.Add('}');
      data.Add('});');
      UniSession.AddJS(data.Text);
    
    
      FreeAndNil(data);
    end;
  3. Hi Dear Friends,

     

    I want to share my new component UniNoty.

     

    It is A Notification -> Smart, Full Customizable and Callbacks

     

    Demo : http://hayriaslan.net/iis/UniNoty/UniNotyDemo.dll

     

    Also i created lots of component like TuniCaptcha, TUniCssMenu, TUniFormatEdit, TUniMasterEdit, TUniNewButton, TUniNewMenu, TUniNotification, TUniNotifIt, TUniSmartAlert, TUniVKeyboardEdit.....

     

    i will make bundle and share soon.

     

     

    Defaults:

                            layout: 'top',
    			theme: 'defaultTheme',
    			type: type,
    			text: type, // can be html or string
    			dismissQueue: true, // If you want to use queue feature set this true
    			template: '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div                         >',
    			animation: {
    				open: {height: 'toggle'},
    				close: {height: 'toggle'},
    				easing: 'swing',
    				speed: 500 // opening & closing animation speed
    			},
    			timeout: 0, // delay for closing event. Set false for sticky notifications
    			force: false, // adds notification to the beginning of queue when set to true
    			modal: false,
    			maxVisible: 10, // you can set max visible notification for dismissQueue true option,
    			killer: false, // for close all notifications before show
    			closeWith: ['click'], // ['click', 'button', 'hover']
    			callback: {
    				onShow: function() {},
    				afterShow: function() {},
    				onClose: function() {},
    				afterClose: function() {},
    				onCloseClick:function () {}
    			},
    			 buttons: [
    				{addClass: 'btn btn-primary', text: 'Ok', onClick: function($noty) {
    
    					
    					noty({text: 'You clicked "Ok" button', type: 'success'});
    				  }
    				},
    				{addClass: 'btn btn-danger', text: 'Cancel', onClick: function($noty) {
    					noty({text: 'You clicked "Cancel" button', type: 'error'});
    				  }
    				}
    			  ]
    

    post-737-0-52285000-1391219472_thumb.png

    • Upvote 6
  4. Dear İdris,

     

    please change UniServerModule.LocalCachePath to UniServerModule.StartPath

     

    or you can use that

     

         s:= UniServerModule.LocalCachePath;

         s := StringReplace(s,'\','/',[rfReplaceAll]);

         UniSession.SendFile(s+DosyaAdi,DosyaAdi);

×
×
  • Create New...