Code review for : /concrete/blocks/html/auto.js

Permalink
I started to build my first block and found this masterful code in the auto.js file for the html block.

// JavaScript Document
var HtmlBlock ={
   validate:function(){
         var failed=0; 
         /*
         var itemsF=$('#ccm_flickr_itemsToDisplay');
         var itemsV=itemsF.val();
         if( !itemsV || itemsV.length==0 || parseInt(itemsV)<1 ){
            alert(ccm_t('feed-num-items'));
            itemsF.focus();
            failed=1;
         }
         */
         if(failed){
            ccm_isBlockError=1;


It would be just as easy to say:
ccmValidateBlockForm = function() { return true; }


Since the actual check is ignored, better yet why not just leave the auto.js file empty? Maybe I'm missing something here, but I really don't think I am.

Can't wait till you guys move to Git so developers like myself can clean up some of those items.

Just thought I would share the fun,
Chad

chadsmith729
 
curtis replied on at Permalink Reply
curtis
Masterful post.
ScottC replied on at Permalink Reply
ScottC
I look forward to seeing your contributions.

What is your github id?
chadsmith729 replied on at Permalink Reply
chadsmith729
chadsmith729 ... i'm really not that original with my name I know. Can't wait till you guys open it up on github so we can make edits.
ScottC replied on at Permalink Reply
ScottC
i can't wait til they do either :). I have like 50 things i'd like to change, mainly parameter type-casting or at the very least some try catch stuff.
chadsmith729 replied on at Permalink Reply
chadsmith729
No doubt, I'm working on a large application and finding things that need modified. What would be REALLY awesome is if they had a front facing ticket system that we could create our own tickets (or have them assigned), then pull a branch and submit the fix to the branch. Then allow their product managers to merge into trunk if they want to. That way it still gives them the flexibility to have code changes, but also has a tracking to it.
olliephillips replied on at Permalink Reply
olliephillips
It's just a bit of redundant code, not ideal but no big deal?

You should see the stuff I write - you'd have a field day!
hereNT replied on at Permalink Reply
hereNT
http://www.concrete5.org/developers/submitting_code_to_concrete/

You could simply make a patch file and submit it while reporting a bug...
andrew replied on at Permalink Reply
andrew
That is pretty obviously not meant to be where it is. Removing it entirely is something sensible that we should do.
chadsmith729 replied on at Permalink Reply
chadsmith729
Hey man, whenever you guys get the repo public then we'll be more than happy to submit changes.

Thanks,
Chad