Skip to main content

Posts

Showing posts from 2017

Akhilesh ka Search

Template.k1.events({   'submit #comment_box': function(){       event.preventDefault();       var k11 = event.target.comment_now.value;       var k12 = event.target.comment_1.value;       var k14 = k11.trim();       //alert(new RegExp('/^' + k12 + '/'))       //check if there is existing comments in same post       const count3 = PostComment.find({post_id:{$regex:new RegExp('^' + k12)}}).count(); //like 'pa%'       //alert('Post id is '+k12+' comment text is '+k14+' and the total post and comment count is '+count3);       var a = 0;       var b = 0;       var c = 0;       var k123 = 0;       var count4 = 0;       var k141;       if(count3 == 0)       {        a = '_1';        k123 = k12+a;       }       else        {         count_3 = count3+1;         a = '_';         count4 = k12+a+count_3;         //const count5 = PostComment.find({post_id: /+k12+/}).count(); //like 'pa%&#

aaa

import { Template } from 'meteor/templating'; import { ReactiveVar } from 'meteor/reactive-var'; import { Session } from 'meteor/session'; import { FriendRequest } from './../../import/collections/insert.js'; import { UserInfo } from './../../import/collections/insert.js'; import { Message } from './../../import/collections/insert.js';     Template.messagingpage.onRendered(function(){       $("ul.tabs").tabs();     }); Template.messanging.helpers({ show_connections(){ // alert('hi'); var sent_to = Session.get("userId"); //alert(sent_to); // db.friend.find({sent_to: 'user_1224544',req_status: 0}).pretty() var show_pending = FriendRequest.find({ $or: [ { $and: [ { sent_to: sent_to },{ req_status: 1 } ] }, { $and: [{ sent_by: sent_to },{ req_status: 1 } ] } ] }).fetch(); // var show_pending = FriendRequest.find({sent_to: sent_to,req_status: 1}).fetch(); var length = show_p

Selective attribute not working dropbox UPDating Dropdown semantic Ui metoer

 <div class="ui selection dropdown">     <input type="hidden" name="test" value="" />     <div class="text">Test</div>     <i class="dropdown icon"></i>     <div class="menu">         <div class="item" data-value="">Not Selected</div>         <div class="item" data-value="A">A</div>         <div class="item" data-value="B">B</div>     </div> </div>

Semantic UI dropdown not working Meteor

< select id= "edit_start_month" > < option value disabled selected > --Select Month-- </ option > < option value= 'Jan' {{ start_date_month_one }} > Jan </ option > < option value= 'Feb' {{ start_date_month_two }} > Feb </ option > < option value= 'Mar' {{ start_date_month_three }} > Mar </ option > < option value= 'Apr' {{ start_date_month_four }} > Apr </ option > < option value= 'May' {{ start_date_month_five }} > May </ option > < option value= 'Jun' {{ start_date_month_six }} > Jun </ option > < option value= 'Jul' {{ start_date_month_seven }} > Jul </ option > < option value= 'Aug' {{ start_date_month_eight }} > Aug </ option > < option value= 'Sep' {{ start_date_month_nine }} > Sep </ option > < option value= 'Oct' {{ start_date_month_ten }}

Blaze selected attribute not working - Alternative Solution

Consider this as your drop down.   <select id="last_used_edit">       <option value="" disabled selected>Year</option>       <option value="1"  selected="{{option3Selected 'Option 1'}}"  >Option 1</option>       <option value="2"  selected="{{option3Selected 'Option 2'}}"  >Option 2</option>       <option value="3" selected="{{option3Selected 'Option 3'}}"  >Option 3</option>       <option value="4" selected="{{option3Selected 'Option 4'}}" >Option 34</option>     </select> Replace the above with this Step 1 .     <div class="ui selection dropdown">     <input type="hidden" name="test" value="" />     <div class="text">Test</div>     <i class="dropdown icon"></i>     &l