﻿var isCancelled = false;

function GetRatingObject() {
    return $find("PostRating");
}

function SetReadOnly() {
    var oRating = GetRatingObject();
    oRating.set_readOnly(true);
}


function OnClientRating(sender, args) {
    if (isCancelled) {
        ShowMessage("ניתן לדרג רק פעם אחת");
        args.set_cancel(isCancelled);
    }
    SetReadOnly();
    isCancelled = true;
}

