<commit_before>// ==========================================================================
// Project:   MySystem.InspectorPane
// Copyright: ©2010 Concord Consortium 
// under the MIT License (see LICENSE file for more info)
// ==========================================================================
/*globals MySystem LinkIt SCUI Forms */

/** @class

  This pane shows the attributes of a diagram object as a form, allowing them to be edited if they can't
  be easily edited in place.

  @extends SC.PalettePane
*/
sc_require('core');
sc_require('views/link_form');

MySystem.InspectorPane = SC.PalettePane.design({
  defaultResponder: 'MySystem.statechart',
  layout: { top: 150, right: 5, width: 270, height: 240 },
  classNames: 'property-editor'.w(),
  
  // the contenView property should be updated with the view that is correct
  // for the current object
  contentView: MySystem.LinkFormView
});<commit_msg>Add ability to have modal version of inspector pane for link creation<commit_after>// ==========================================================================
// Project:   MySystem.InspectorPane
// Copyright: ©2010 Concord Consortium 
// under the MIT License (see LICENSE file for more info)
// ==========================================================================
/*globals MySystem LinkIt SCUI Forms */

/** @class

  This pane shows the attributes of a diagram object as a form, allowing them to be edited if they can't
  be easily edited in place.

  @extends SC.PalettePane
*/
sc_require('core');
sc_require('views/link_form');

MySystem.InspectorPane = SC.PalettePane.design({
  defaultResponder: 'MySystem.statechart',
  isOptionsForNewLink: NO,
  layout: function(){
    if (this.get('isOptionsForNewLink')){
      return { centerY: 0, centerX: 0, width: 270, height: 200 };
    } else {
      return { top: 150, right: 5, width: 270, height: 200 };
    }
  }.property('isOptionsForNewLink'),
  classNames: 'property-editor'.w(),
  
  // the contenView property should be updated with the view that is correct
  // for the current object
  contentView: SC.View.design({
    childViews: 'title form'.w(),
    title: SC.LabelView.design({
      value: function() {
        if (this.getPath('parentView.parentView.isOptionsForNewLink')){
          return "Pick an energy type for your new link";
        }
        return "Energy type of your link:";
      }.property('parentView.parentView.isOptionsForNewLink'),
      layout: {top: 0, left: 0, right: 0, height: 22}
    }),
    form: MySystem.LinkFormView.design({
      layout: {top: 22, left: 0, right: 0}
    })
  })
});
{'fraction_non_alphanumeric': 0.2194561470700881, 'fraction_numerical': 0.017234775947912676, 'mean_word_length': 4.062015503875969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2955332', 'n_tokens_mistral': 783, 'n_tokens_neox': 697, 'n_words': 241}