Category Archives: Uncategorized

Delaying the Display of SharePoint’s ECB Menu

A viewer of my Pluralsight course Developing SharePoint 2013 Solutions with JavaScript, part 3 posed a question about working with the ECB (Edit Control Block) available in SharePoint and Office 365.  In their situation, they needed to delay the showing of the ECB menu while they called back to the server to do some checking and they weren’t sure how to do it.

Before getting to the code sample, a quick word of caution – realize that this could present potential performance problems depending on how quickly the call makes it’s roundtrip to the server and back.  In any case, this would be a situation in which you would want to trim the response down to the bare minimum necessary – don’t pull down extra fields that you don’t need or else your users are likely to notice the impact and not be too thrilled with it.

With that said, here is a quick code sample that that will delay the presentation of the ECB for 5 seconds.  Normally, you would not simply add the delay, but instead replace it with whatever calls you need to make.  All this code is doing is:

  1. storing the current function that displays the ECB in a new variable
  2. overwriting the function that display the ECB with our own function to store some information we need later
  3. calling the code to do whatever you need it to do (make a call back to the server, etc) , in the example, simply delaying for 5 seconds
  4. Using the stored function from #1 to call the ECB display and pass in the information stored in #3
//store the function before overwriting it
ecbFunc = ShowECBMenuForTr;
ShowECBMenuForTr = function(t,e){
    ecbTarget = t;
    ecbEvent = e;
    //now do whatever you need.  In this case, I'm just delaying 5 seconds
    setTimeout(function(){
        // call the function we stored above and pass in variables
        ecbFunc(ecbTarget, ecbEvent);
    }, 5000);
};

And that’s it.  When a user clicks on the ellipsis to show the ECB on any page where this code is loaded will now run our custom ShowECBMenuForTr function (because monkey patching, which I cover in the Pluralsight courses).

A few final points:

  1. I’m using global variables here, which isn’t recommended for production code.  I discuss namespacing in the Pluralsight courses to avoid this
  2. The out-of-the-box function ShowECBMenuForTr is what shows the ECB and it *is* in the global namespace, so you don’t want to hide that inside your own custom namespace.
  3. This code should go into your own code file, *not* one of the out-of-the-box JavaScript files provided by SharePoint

Dave

YASSC – Yet Another SharePoint SKU Comparison

So, there’s already a couple of these on the web (see here, here, and here, for example). These are all great resources to browse, but it seems to me that I’m always trying to answer one question for clients as I review these resources – what do I lose by dropping down a license level? So, with that in mind, here’s my unofficial list – note that this is strictly for on-premises licensing. I’ll get around to an online version the next time I need to address that for a client. This is based on the “official” feature matrix available here: http://technet.microsoft.com/en-us/library/jj819267.aspx#bkmk_FeaturesOnPremise as of 9/20/2013. Click on any item to see more information about it.

These things are in Enterprise Editionthis is everything SharePoint on-premises does

 


Developer features

IT Professional features

Content features

Insights features

Search features

Sites features

Social features

Dropping from Enterprise Edition to Standard Edition, you lose:

 

Developer Features:

IT Pro Features:

Content Features:

Insights Features (Business Intelligence):

Search Features:

Sites Features

  • (None)

Social Feature

  • (None)

Dropping from Standard Edition to Foundation, you lose everything listed to the left, plus:

 

Developer Features

IT Pro Features

Content Features

Insights Features (Business Intelligence):

  • (None)

Search Features

Sites Features

Social Features

 

 

Now Hiring

  1. Business is good and continuing to trend in the right direction (up, if you’re wondering).
  2. Life is busy.
  3. There are only 24 hours in a day.

Combine all three of these together and I very quickly come to the realization that it’s time to find some help, so I’m looking to hire a personal/administrative assistant. Here’s some information on the position, in no particular order:

  1. Local to the Chester County, Pennsylvania area – there is need for a local person for some tasks
  2. Approximately 10-15 hours per week – some weeks more, if you’re available, some weeks perhaps less, but probably not. Other than a minimum of 2-3 hours that MUST be done each week, the task list can be managed to fit your availability on a week by week basis.
  3. 100% flexibility on the hours. Except for the occasional need to meet in-person and the fact that some of the things (errands, etc) must be done while stores/shops are open, I don’t care when you work. 4 AM or 4 PM – it makes no difference to me
  4. Remote work – My office is in my house and it’s barely big enough for me, so everything can be done from your home, a coffee shop, etc. Again, it doesn’t matter to me.
  5. Type of work:
    1. Scanning and electronic filing
    2. Research on various topics
    3. Scheduling and calendar maintenance
    4. Data entry
    5. Lightweight software/website testing
    6. Proofreading
    7. Errands (local pick-up/drop-off)
    8. More (TBD)
  6. Pay rate is TBD. I’m looking to pay fairly and so am open to a discussion of what that means
  7. The person selected will be a 1099 contractor, not an employee of my business

Please contact me if you are interested (contact information is available on my website: www.mannsoftware.com).

 

Thanks!