<commit_before><div class="header" ng-hide="kioskMode">
    <!--<a class="btn btn-link pull-right" title="Toggle full screen"
        ng-click="vm.goFullscreen()">
        <i class="glyphicon glyphicon-resize-full"></i>
    </a>-->
    <a class="btn pull-left" title="Menu" snap-toggle="left">
        <i class="glyphicon glyphicon-menu-hamburger"></i>
    </a>
    <a class="btn pull-right" 
        title="Edit dashboards"
        ng-hide="lockEditing" ng-click="vm.toggleEditMode()" ng-class="{ 'btn-danger': vm.editMode }">
        <i class="glyphicon glyphicon-cog"></i>
    </a>
    <!--<h1 ng-hide="settings.no_clock">{{vm.clock | date:'EEE d MMM HH:mm:ss'}}</h1>
    <h1 ng-show="settings.no_clock">&nbsp;</h1>-->
</div>
<!-- Tutorial part 1 -->
<div ng-if="!vm.dashboards.length" class="text-muted">
    <div ng-if="lockEditing">
        <h2>
            <i class="glyphicon glyphicon-alert"></i>
            <br />Editing is disabled on the server!
        </h2>
        <h3>Please go to Paper UI and unlock editing to use HABPanel on this device.</h3>
    </div>
    <div ng-if="!lockEditing && !vm.editMode" class="pull-right">
        <h2>
            <i class="glyphicon glyphicon-arrow-up pull-right"></i>
            Welcome to HABPanel!<br />Click or tap here to begin.&nbsp;&nbsp;
        </h2>
    </div>
    <div ng-if="!lockEditing && vm.editMode" class="text-center">
        <h4>You're now in edit mode, where you can design dashboards.<h4>
    </div>
</div>

<div class="dashboard row scrollable">
    <div gridster="vm.gridsterOptions" class="col-md-12 col-lg-12">
        <div gridster-item="dash" ng-init="tile=dash.tile" class="dash-card col-md-6 col-lg-6 col-sm-6 box" ng-repeat="dash in vm.dashboards">
            <div class="pull-left dash-buttons" ng-if="vm.editMode" data-snap-ignore="true">
                <span class="pull-right handle">
                    <i class="glyphicon" ng-class="{ 'glyphicon-sort': vm.gridsterOptions.columns<2, 'glyphicon-move': vm.gridsterOptions.columns>1 }"></i>
                </span>
            </div>
            <div class="pull-right dash-buttons" ng-if="vm.editMode">
                <!--<a class="pull-right" ng-click="vm.removeDashboard(dash)"><i class="glyphicon glyphicon-trash">&nbsp;</i></a>-->
                <a class="pull-right" title="Dashboard settings" 
                    ng-click="vm.openDashboardSettings(dash)">
                    <i class="glyphicon glyphicon-cog"></i>
                </a>
            </div>
            <em class="dash-edit" ng-if="vm.editMode">
                <i class="glyphicon glyphicon-edit"></i>
                {{dash.name}}
            </em>
            <h3 ng-if="vm.editMode" ng-click="vm.viewDashboard(dash)" class="card-title"></h3>

            <h3 ng-show="!vm.editMode" ng-style="{ color:(tile.title_color && tile.title_color!='transparent')?tile.title_color:'inherit' }" ng-click="vm.viewDashboard(dash)" class="card-title">
                <img class="tile-background" ng-if="tile.background_image" ng-src="{{tile.background_image}}" />
                <widget-icon ng-if="tile.backdrop_icon && !tile.background_image" backdrop="true" iconset="tile.backdrop_iconset" icon="tile.backdrop_icon" center="tile.backdrop_center"></widget-icon>
                <!--<widget-icon iconset="'smarthome-set'" icon="'bulb'" backdrop="true"></widget-icon>-->
                <div>{{dash.name}}</div>
            </h3>
        </div>
    </div>       
</div>

<br />

<!-- Tutorial part 2 -->
<div ng-if="!vm.dashboards.length && vm.editMode" class="col-xs-12 text-muted">
    <div class="col-xs-4 text-center">
        <div class="pull-left">
            <h4>
                Click or tap here to create your first dashboard...
                <br /><i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
</div>
<div class="col-xs-4 text-center"></div>
<div class="col-xs-4 text-center">
    <div>
        <h4>
            ...or here to import a previous one<br />
            <i class="glyphicon glyphicon-arrow-down"></i>
        </h4>
    </div>
</div>
</div>
<!-- Tutorial part 3 -->
<div ng-if="vm.dashboards.length==1 && !vm.dashboards[0].widgets.length" class="col-xs-12 text-muted">
    <div class="col-xs-4 text-left">
        <div ng-if="vm.editMode" class="pull-left">
            <h4>
                &nbsp;<i class="glyphicon glyphicon-arrow-up"></i>
                &nbsp;Click or tap inside the tile to enter the dashboard designer.
            </h4>
        </div>
    </div>
    <div class="col-xs-4 text-center">
        <div ng-if="vm.editMode">
            <h4>
                Adjust the number of columns
                <br /><i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
    </div>
    <div class="col-xs-4 text-right">
        <div ng-if="vm.editMode">
            <h4>
                Save on the openHAB 2 server when done!
                &nbsp;<i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
    </div>
</div>
<div class="col-xs-12 text-muted" ng-if="vm.editMode">
    <div class="col-xs-4 text-center">
        <a ng-click="vm.addNewDashboard()">
            <h4>
                <i class="glyphicon glyphicon-plus"></i>
                <br />Add new dashboard
            </h4>
        </a>
    </div>
    <div class="col-xs-4 text-center">
        <rzslider ng-if="vm.dashboards.length" rz-slider-model="vm.gridsterOptions.columns" rz-slider-options="{ floor:1, ceil:6, showTicks: true, onEnd: vm.onChangedColumns() }" />
    </div>
    <div class="col-xs-4 text-center">
        <a href="#/settings">
            <h4>
                <i class="glyphicon glyphicon-edit"></i>
                <br />Advanced settings
            </h4>
        </a>
    </div>
    <br />
    <br />
    <br />
</div>
<commit_msg>No drag on main menu tiles when editing (#91)<commit_after><div class="header" ng-hide="kioskMode">
    <!--<a class="btn btn-link pull-right" title="Toggle full screen"
        ng-click="vm.goFullscreen()">
        <i class="glyphicon glyphicon-resize-full"></i>
    </a>-->
    <a class="btn pull-left" title="Menu" snap-toggle="left">
        <i class="glyphicon glyphicon-menu-hamburger"></i>
    </a>
    <a class="btn pull-right" 
        title="Edit dashboards"
        ng-hide="lockEditing" ng-click="vm.toggleEditMode()" ng-class="{ 'btn-danger': vm.editMode }">
        <i class="glyphicon glyphicon-cog"></i>
    </a>
    <!--<h1 ng-hide="settings.no_clock">{{vm.clock | date:'EEE d MMM HH:mm:ss'}}</h1>
    <h1 ng-show="settings.no_clock">&nbsp;</h1>-->
</div>
<!-- Tutorial part 1 -->
<div ng-if="!vm.dashboards.length" class="text-muted">
    <div ng-if="lockEditing">
        <h2>
            <i class="glyphicon glyphicon-alert"></i>
            <br />Editing is disabled on the server!
        </h2>
        <h3>Please go to Paper UI and unlock editing to use HABPanel on this device.</h3>
    </div>
    <div ng-if="!lockEditing && !vm.editMode" class="pull-right">
        <h2>
            <i class="glyphicon glyphicon-arrow-up pull-right"></i>
            Welcome to HABPanel!<br />Click or tap here to begin.&nbsp;&nbsp;
        </h2>
    </div>
    <div ng-if="!lockEditing && vm.editMode" class="text-center">
        <h4>You're now in edit mode, where you can design dashboards.<h4>
    </div>
</div>

<div class="dashboard row scrollable">
    <div ng-if="vm.editMode" gridster="vm.gridsterOptions" class="col-md-12 col-lg-12">
        <div gridster-item="dash" ng-init="tile=dash.tile" class="dash-card col-md-6 col-lg-6 col-sm-6 box" ng-repeat="dash in vm.dashboards" data-snap-ignore="true">
            <div class="pull-left dash-buttons">
                <span class="pull-right handle">
                    <i class="glyphicon" ng-class="{ 'glyphicon-sort': vm.gridsterOptions.columns<2, 'glyphicon-move': vm.gridsterOptions.columns>1 }"></i>
                </span>
            </div>
            <div class="pull-right dash-buttons">
                <a class="pull-right" title="Dashboard settings" 
                    ng-click="vm.openDashboardSettings(dash)">
                    <i class="glyphicon glyphicon-cog"></i>
                </a>
            </div>
            <em class="dash-edit">
                <i class="glyphicon glyphicon-edit"></i>
                {{dash.name}}
            </em>
            <h3 ng-click="vm.viewDashboard(dash)" class="card-title"></h3>
        </div>
    </div>
    <div ng-if="!vm.editMode" gridster="vm.gridsterOptions" class="col-md-12 col-lg-12">
        <div gridster-item="dash" ng-init="tile=dash.tile" class="dash-card col-md-6 col-lg-6 col-sm-6 box" ng-repeat="dash in vm.dashboards">
            <h3 ng-style="{ color:(tile.title_color && tile.title_color!='transparent')?tile.title_color:'inherit' }" ng-click="vm.viewDashboard(dash)" class="card-title">
                <img class="tile-background" ng-if="tile.background_image" ng-src="{{tile.background_image}}" />
                <widget-icon ng-if="tile.backdrop_icon && !tile.background_image" backdrop="true" iconset="tile.backdrop_iconset" icon="tile.backdrop_icon" center="tile.backdrop_center"></widget-icon>
                <!--<widget-icon iconset="'smarthome-set'" icon="'bulb'" backdrop="true"></widget-icon>-->
                <div>{{dash.name}}</div>
            </h3>
        </div>
    </div>       
</div>

<br />

<!-- Tutorial part 2 -->
<div ng-if="!vm.dashboards.length && vm.editMode" class="col-xs-12 text-muted">
    <div class="col-xs-4 text-center">
        <div class="pull-left">
            <h4>
                Click or tap here to create your first dashboard...
                <br /><i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
</div>
<div class="col-xs-4 text-center"></div>
<div class="col-xs-4 text-center">
    <div>
        <h4>
            ...or here to import a previous one<br />
            <i class="glyphicon glyphicon-arrow-down"></i>
        </h4>
    </div>
</div>
</div>
<!-- Tutorial part 3 -->
<div ng-if="vm.dashboards.length==1 && !vm.dashboards[0].widgets.length" class="col-xs-12 text-muted">
    <div class="col-xs-4 text-left">
        <div ng-if="vm.editMode" class="pull-left">
            <h4>
                &nbsp;<i class="glyphicon glyphicon-arrow-up"></i>
                &nbsp;Click or tap inside the tile to enter the dashboard designer.
            </h4>
        </div>
    </div>
    <div class="col-xs-4 text-center">
        <div ng-if="vm.editMode">
            <h4>
                Adjust the number of columns
                <br /><i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
    </div>
    <div class="col-xs-4 text-right">
        <div ng-if="vm.editMode">
            <h4>
                Save on the openHAB 2 server when done!
                &nbsp;<i class="glyphicon glyphicon-arrow-down"></i>
            </h4>
        </div>
    </div>
</div>
<div class="col-xs-12 text-muted" ng-if="vm.editMode">
    <div class="col-xs-4 text-center">
        <a ng-click="vm.addNewDashboard()">
            <h4>
                <i class="glyphicon glyphicon-plus"></i>
                <br />Add new dashboard
            </h4>
        </a>
    </div>
    <div class="col-xs-4 text-center">
        <rzslider ng-if="vm.dashboards.length" rz-slider-model="vm.gridsterOptions.columns" rz-slider-options="{ floor:1, ceil:6, showTicks: true, onEnd: vm.onChangedColumns() }" />
    </div>
    <div class="col-xs-4 text-center">
        <a href="#/settings">
            <h4>
                <i class="glyphicon glyphicon-edit"></i>
                <br />Advanced settings
            </h4>
        </a>
    </div>
    <br />
    <br />
    <br />
</div>

{'fraction_non_alphanumeric': 0.1834083382864906, 'fraction_numerical': 0.011293198607455208, 'mean_word_length': 2.1341138903672165, 'pattern_counts': {'":': 0, '<': 324, '<?xml version=': 0, '>': 324, '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': '3270808', 'n_tokens_mistral': 4056, 'n_tokens_neox': 3861, 'n_words': 797}