dojox/xmpp/widget/ChatSession.js

  • Provides:

    • dojox.xmpp.widget.ChatSession
  • dojox.xmpp.widget.ChatSession

    • type
      Function
    • chains:
      • dijit.layout.LayoutContainer: (prototype)
      • dijit.layout.LayoutContainer: (call)
      • dijit._Templated: (call)
    • mixins:
      • dijit._Templated.prototype: (prototype)
    • summary
  • dojox.xmpp.widget.ChatSession.templateString

    • summary
  • dojox.xmpp.widget.ChatSession.enableSubWidgets

    • summary
  • dojox.xmpp.widget.ChatSession.widgetsInTemplate

    • summary
  • dojox.xmpp.widget.ChatSession.widgetType

    • summary
  • dojox.xmpp.widget.ChatSession.chatWith

    • summary
  • dojox.xmpp.widget.ChatSession.instance

    • summary
  • dojox.xmpp.widget.ChatSession.postCreate

    • type
      Function
    • source: [view]
      dojo.provide("dojox.xmpp.widget.ChatSession");
      dojo.declare("dojox.xmpp.widget.ChatSession",
       [dijit.layout.LayoutContainer, dijit._Templated],
       {
         templateString: dojo.cache("dojox.xmpp.widget", "templates/ChatSession.html"),
         enableSubWidgets: true,
         widgetsInTemplate: true,

         
         widgetType: "ChatSession",
         chatWith: null,
         instance: null,
         postCreate: function(){
          //console.log("Neato!");
    • summary
  • dojox.xmpp.widget.ChatSession.displayMessage

    • type
      Function
    • parameters:
      • message: (typeof )
      • type: (typeof )
    • source: [view]
      dojo.provide("dojox.xmpp.widget.ChatSession");
      dojo.declare("dojox.xmpp.widget.ChatSession",
       [dijit.layout.LayoutContainer, dijit._Templated],
       {
         templateString: dojo.cache("dojox.xmpp.widget", "templates/ChatSession.html"),
         enableSubWidgets: true,
         widgetsInTemplate: true,

         
         widgetType: "ChatSession",
         chatWith: null,
         instance: null,
         postCreate: function(){
          //console.log("Neato!");
         },

       
         displayMessage: function(message, type) {
          //console.log("displayMessage", this, message);
          if(message) {
           var name = message.from ? this.chatWith : "me";
           this.messages.domNode.innerHTML += "" + name + ": " + message.body + "
      ";
           this.goToLastMessage();
          }
    • summary
  • dojox.xmpp.widget.ChatSession.goToLastMessage

    • type
      Function
    • source: [view]
          this.messages.domNode.scrollTop = this.messages.domNode.scrollHeight;
    • summary
  • dojox.xmpp.widget.ChatSession.onKeyPress

    • type
      Function
    • parameters:
      • e: (typeof )
    • source: [view]
          var key = e.keyCode || e.charCode;
          if ((key == dojo.keys.ENTER) && (this.chatInput.value != "")){
           this.instance.sendMessage({body: this.chatInput.value});
           this.displayMessage( {body: this.chatInput.value}, "out");
           this.chatInput.value = "";
          }
    • summary
  • dojox.xmpp.widget.ChatSession.messages.domNode.scrollTop

    • summary
  • dojox.xmpp.widget.ChatSession.chatInput.value

    • summary
  • dojox.xmpp.widget

    • type
      Object
    • summary
  • dojox.xmpp

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary