Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($){
- VShowroomItem=Backbone.View.extend({
- el:$(".sr-item")
- ,initialize:function(scopeid,owner_id){
- this.el=$('.sr-item:regex(data-owner_id,'+owner_id+')');
- this.owner_scope=scopeid;
- this.owner_id=owner_id;
- }
- ,events:{
- 'click .send-friendship-req': 'makeJoinReq'
- ,'click .send-msg-to-company':'sendMessage'
- }
- ,sendMessage:function(){
- new MessageHandler(this.owner_scope,this.owner_id,function(c,h){
- h.show();
- });
- }
- });
- $('.sr-item').each(function(i,item){
- var SRItem=new VShowroomItem(scopes['Company'],$(item).dataset("owner_id"));
- });
- })(jQuery);
- <div class="sr-item" data-owner_id="3">
- <div><span class="send-msg-to-company">Send message</span></div>
- </div>
- <div class="sr-item" data-owner_id="4">
- <div><span class="send-msg-to-company">Send message</span></div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement