<commit_before><div class="container-fluid">
  <div class="row">
    <div class="col-sm-12 col-md-6 col-xl-7">
      <div class="row">
        <div data-ng-if="lattice.activeBeamlineId" class="col-sm-12">
          <div data-report-panel="lattice" data-model-name="beamlineReport" data-panel-title="Beamline Report - {{ lattice.getActiveBeamline().name }}"></div>
        </div>
        <div class="col-sm-12">
          <div data-beamline-editor="" data-controller="lattice"></div>
        </div>
      </div>
    </div>
    <div class="col-sm-12 col-md-6 col-xl-5" data-ng-attr-style="height: {{ lattice.splitPaneHeight() }}">
      <div class="s-split-pane-frame">
	<div data-split-pane>
	  <div data-split-pane-component>
	    <div class="s-split-pane-component-inner">

              <div class="panel panel-info">
                <div class="panel-heading"><span class="s-panel-heading">Beamlines</span></div>
                <div class="panel-body">

                  <button class="btn btn-info btn-xs pull-right" accesskey="b" data-ng-click="lattice.newBeamline()"><span class="glyphicon glyphicon-plus"></span> New <u>B</u>eamline</button>

                  <div data-beamline-table="" data-controller="lattice"></div>
                </div>
              </div>

	    </div>
	  </div>
	  <div data-split-pane-divider data-height="15px"></div>
	  <div data-split-pane-component data-height="70%">
	    <div class="s-split-pane-component-inner">

              <!-- TODO(pjm): refactor panels -->
              <div class="panel panel-info">
                <div class="panel-heading"><span class="s-panel-heading">Beamline Elements</span></div>
                <div class="panel-body">

                  <button class="btn btn-info btn-xs pull-right" data-ng-click="lattice.newElement()" accesskey="e"><span class="glyphicon glyphicon-plus"></span> New <u>E</u>lement</button>

                  <div data-element-table="" data-controller="lattice"></div>
                </div>
              </div>


	    </div>
	  </div>
	</div>
      </div>
    </div>
  </div> <!-- /row -->
</div> <!-- /container -->

<div data-ng-drag-clone=""><div class="badge elegant-icon elegant-item-selected"><span>{{ clonedData.name }}</span></div></div>

<!-- New beamline element modal -->
<div class="modal fade" id="s-newBeamlineElement-editor" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header bg-info">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <span class="lead modal-title text-info">New Beamline Element</span>
      </div>
      <div class="modal-body">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-12">
              <ul class="nav nav-tabs">
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'basic'}"><a href data-ng-click="lattice.activeTab = 'basic'">Basic</a></li>
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'advanced'}"><a href data-ng-click="lattice.activeTab = 'advanced'">Advanced</a></li>
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'all'}"><a href data-ng-click="lattice.activeTab = 'all'">All Elements</a></li>
              </ul>
            </div>
          </div>
          <br />
          <div data-ng-if="lattice.activeTab == 'basic'" class="row">
            <div data-ng-repeat="name in lattice.basicNames" class="col-sm-4">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <div data-ng-if="lattice.activeTab == 'advanced'" class="row">
            <div data-ng-repeat="name in lattice.advancedNames" class="col-sm-2">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default btn-sm" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <div data-ng-if="lattice.activeTab == 'all'" class="row">
            <div data-ng-repeat="name in lattice.allNames" class="col-sm-2">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default btn-sm" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <br />
          <div class="row">
            <div class="col-sm-offset-6 col-sm-3">
              <button data-dismiss="modal" class="btn btn-primary" style="width:100%">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="modal fade" id="s-element-in-use-dialog" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header bg-warning">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <span class="lead modal-title text-info">{{ lattice.deleteWarning.typeName }} {{ lattice.deleteWarning.name }}</span>
      </div>
      <div class="modal-body">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-12">
              <p>The {{ lattice.deleteWarning.typeName }} <strong>{{ lattice.deleteWarning.name }}</strong> is used by the <strong>{{ lattice.deleteWarning.beamlineName }}</strong> and can not be deleted.</p>
            </div>
            <div class="col-sm-offset-6 col-sm-3">
              <button data-dismiss="modal" class="btn btn-primary" style="width:100%">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="modal fade" id="s-delete-element-dialog" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header bg-warning">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <span class="lead modal-title text-info">{{ lattice.deleteWarning.typeName }} {{ lattice.deleteWarning.name }}</span>
      </div>
      <div class="modal-body">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-12">
              <p>Delete {{ lattice.deleteWarning.typeName }} <strong>{{ lattice.deleteWarning.name }}</strong>?</p>
            </div>
            <div class="col-sm-offset-4 col-sm-3">
              <button data-ng-click="lattice.deleteElement()" data-dismiss="modal" class="btn btn-danger" style="width:100%">Delete</button>
            </div>
            <div class="col-sm-3">
              <button data-dismiss="modal" class="btn btn-primary" style="width:100%">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div data-modal-editor="" view-name="beamline" data-parent-controller="lattice"></div><commit_msg>refactor modal dialogs into confirmationModal directives<commit_after><div class="container-fluid">
  <div class="row">
    <div class="col-sm-12 col-md-6 col-xl-7">
      <div class="row">
        <div data-ng-if="lattice.activeBeamlineId" class="col-sm-12">
          <div data-report-panel="lattice" data-model-name="beamlineReport" data-panel-title="Beamline Report - {{ lattice.getActiveBeamline().name }}"></div>
        </div>
        <div class="col-sm-12">
          <div data-beamline-editor="" data-controller="lattice"></div>
        </div>
      </div>
    </div>
    <div class="col-sm-12 col-md-6 col-xl-5" data-ng-attr-style="height: {{ lattice.splitPaneHeight() }}">
      <div class="s-split-pane-frame">
	<div data-split-pane>
	  <div data-split-pane-component>
	    <div class="s-split-pane-component-inner">

              <div class="panel panel-info">
                <div class="panel-heading"><span class="s-panel-heading">Beamlines</span></div>
                <div class="panel-body">

                  <button class="btn btn-info btn-xs pull-right" accesskey="b" data-ng-click="lattice.newBeamline()"><span class="glyphicon glyphicon-plus"></span> New <u>B</u>eamline</button>

                  <div data-beamline-table="" data-controller="lattice"></div>
                </div>
              </div>

	    </div>
	  </div>
	  <div data-split-pane-divider data-height="15px"></div>
	  <div data-split-pane-component data-height="70%">
	    <div class="s-split-pane-component-inner">

              <!-- TODO(pjm): refactor panels -->
              <div class="panel panel-info">
                <div class="panel-heading"><span class="s-panel-heading">Beamline Elements</span></div>
                <div class="panel-body">

                  <button class="btn btn-info btn-xs pull-right" data-ng-click="lattice.newElement()" accesskey="e"><span class="glyphicon glyphicon-plus"></span> New <u>E</u>lement</button>

                  <div data-element-table="" data-controller="lattice"></div>
                </div>
              </div>


	    </div>
	  </div>
	</div>
      </div>
    </div>
  </div> <!-- /row -->
</div> <!-- /container -->

<div data-ng-drag-clone=""><div class="badge elegant-icon elegant-item-selected"><span>{{ clonedData.name }}</span></div></div>

<!-- New beamline element modal -->
<div class="modal fade" id="s-newBeamlineElement-editor" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header bg-info">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <span class="lead modal-title text-info">New Beamline Element</span>
      </div>
      <div class="modal-body">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-12">
              <ul class="nav nav-tabs">
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'basic'}"><a href data-ng-click="lattice.activeTab = 'basic'">Basic</a></li>
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'advanced'}"><a href data-ng-click="lattice.activeTab = 'advanced'">Advanced</a></li>
                <li role="presentation" data-ng-class="{active: lattice.activeTab == 'all'}"><a href data-ng-click="lattice.activeTab = 'all'">All Elements</a></li>
              </ul>
            </div>
          </div>
          <br />
          <div data-ng-if="lattice.activeTab == 'basic'" class="row">
            <div data-ng-repeat="name in lattice.basicNames" class="col-sm-4">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <div data-ng-if="lattice.activeTab == 'advanced'" class="row">
            <div data-ng-repeat="name in lattice.advancedNames" class="col-sm-2">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default btn-sm" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <div data-ng-if="lattice.activeTab == 'all'" class="row">
            <div data-ng-repeat="name in lattice.allNames" class="col-sm-2">
              <button style="width: 100%; margin-bottom: 1ex;" class="btn btn-default btn-sm" type="button" data-ng-click="lattice.createElement(name)" data-ng-attr-title="{{ lattice.titleForName(name) }}">{{ name }}</button>
            </div>
          </div>
          <br />
          <div class="row">
            <div class="col-sm-offset-6 col-sm-3">
              <button data-dismiss="modal" class="btn btn-primary" style="width:100%">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div data-confirmation-modal="" data-id="s-element-in-use-dialog" data-title="{{ lattice.deleteWarning.typeName }} {{ lattice.deleteWarning.name }}" data-ok-text="" data-cancel-text="Close">The {{ lattice.deleteWarning.typeName }} <strong>{{ lattice.deleteWarning.name }}</strong> is used by the <strong>{{ lattice.deleteWarning.beamlineName }}</strong> and can not be deleted.</div>

<div data-confirmation-modal="" data-id="s-delete-element-dialog" data-title="{{ lattice.deleteWarning.typeName }} {{ lattice.deleteWarning.name }}" data-ok-text="Delete" data-ok-clicked="lattice.deleteElement()">Delete {{ lattice.deleteWarning.typeName }} <strong>{{ lattice.deleteWarning.name }}</strong>?</div>

<div data-modal-editor="" view-name="beamline" data-parent-controller="lattice"></div>
{'fraction_non_alphanumeric': 0.19534202205598827, 'fraction_numerical': 0.007557646332999152, 'mean_word_length': 2.656047363969552, 'pattern_counts': {'":': 0, '<': 355, '<?xml version=': 0, '>': 355, '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': '930825', 'n_tokens_mistral': 4177, 'n_tokens_neox': 3981, 'n_words': 743}