Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script type="text/javascript" src="https://snxd.akamaized.net/js/stamp-1.0.14.js"></script>
<div ng-app="multi-repo-app" ng-controller="multi-repo-cart" id="multi-repo-app">
  <table>
    <tr>
      <th><h4>Mission</h4></th>
      <th><h4>Sample</h4></th>
      <th><h4>Description</h4></th>
      <th><h4>Size</h4></th>
      <th><h4>Download</h4></th>
    </tr>
    <tr ng-repeat="item in items">
      <td>
        <b>{{ item.name }}</b>
        <br>
        <br>
        <img ng-src="{{item.icon}}" />
      </td>
      <td>
        <div ng-repeat="image in item.images">
          <img ng-src="{{image}}" width="150" align="left" />
        </div>
      </td>
      <td ng-bind-html="item.description"></td>
      <td>{{ item.size }}</td>
      <td>
        <center>
          <div class="item-in-cart">
            <input class="download-item" id="checkbox-{{$index}}" type="checkbox" ng-model="item.checked" ng-change="checkItem()" value="None">
            <label for="checkbox-{{$index}}"></label>
          </div>
        </center>
      </td>
    </tr>
  </table>
  <button class="alignright" disabled="disabled" ng-click="downloadItems()">
    <i class="fa fa-download"></i> Download Selected Items</button>
</div>
              
            
!

CSS

              
                #multi-repo-app .download-popup {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

#multi-repo-app table {
  border-collapse: collapse;
  background-color: white;
}
#multi-repo-app td,
#multi-repo-app th {
  font-family: Open Sans;
  font-size: 15px;
  color: #535353;
  vertical-align: top;
  line-height: 1.6;
  border: 0px solid lightgray;
}
#multi-repo-app td { 
  padding: 10px;
}
#multi-repo-app td:nth-child(1) {
  width: 100px;
  text-align: center;
}
#multi-repo-app td:nth-child(2) {
  width: 170px;
  text-align: center;
}
#multi-repo-app td:nth-child(5) {
  width: 170px;
  text-align: center;
}
#multi-repo-app td img {
  padding-right: 6px;
  padding-bottom: 6px;
}
#multi-repo-app th {
  background-color: #e7e2e2;
}
#multi-repo-app th h4 {
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  margin: 6px;
}

#multi-repo-app button {
  font-family: Raleway, Open Sans;
  font-weight: 600;
  text-transform: uppercase;
  border-width: 0px;
  border-bottom: 3px;
  border-color: #73353f;
  border-style: solid;
  border-radius: 4px;
  padding: 8px;
  padding-left: 16px;
  padding-right: 16px;
  background-color: #a24d4f;
  color: white;
}
#multi-repo-app button:hover {
  color: #f8f1d1;
  cursor: pointer;
}
#multi-repo-app button:disabled {
  background-color: #e0e0e0 !important;
  border-color: lightgray !important;
  color: #909090 !important;
}
#multi-repo-app button.alignright {
  float: right;
}

#multi-repo-app .item-in-cart {
  width: 20px;
  position: relative;
}
#multi-repo-app .item-in-cart label {
  width: 20px;
  height: 20px;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  background: #ffffff;
  background: linear-gradient(to bottom, #ffffff 0%, #f1f1f1 40%, #cecece 100%);
  border-radius: 4px;
  border: 1px solid #c0c0c0;
}
#multi-repo-app .item-in-cart label:after {
  content: '';
  width: 9px;
  height: 5px;
  position: absolute;
  top: 5px;
  left: 4px;
  border: 3px solid #333;
  border-top: none;
  border-right: none;
  background: transparent;
  opacity: 0;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
#multi-repo-app .item-in-cart label:hover::after {
  opacity: 0.5;
}
#multi-repo-app .item-in-cart input[type=checkbox] {
  visibility: hidden;
}
#multi-repo-app .item-in-cart input[type=checkbox]:checked+label:after {
  opacity: 1;
}

#multi-repo-app td:nth-child(1) {
  width: 80px;
  text-align: center;
}
#multi-repo-app td:nth-child(2) {
  width: 320px;
  text-align: center;
}
#multi-repo-app td img {
  padding-right: 6px;
  padding-bottom: 6px;
}

              
            
!

JS

              
                angular.module('multi-repo-app', ['ngSanitize'])
  .controller('multi-repo-cart', function ($scope) {
  // List of all items available for download
  $scope.items = [
    {
      "name": "Apollo 11",
      "icon": "https://snxd.akamaized.net/demoassets/apollo11/apollo11.png",
      "images": ["https://snxd.akamaized.net/demoassets/apollo11/apollo11-1.jpg", "https://snxd.akamaized.net/demoassets/apollo11/apollo11-2.jpg"],
      "description": "Apollo 11 was the spaceflight that landed the first two humans on the Moon. Mission commander Neil Armstrong and pilot Buzz Aldrin, both American, landed the lunar module Eagle on July 20, 1969.<br><br><b>This set includes 143 high-resolution images of the Apollo 11 mission.</b>",
      "size": "2.01GB",
      "data":
      {
        "name": "Apollo 11",
        "image": "https://snxd.akamaized.net/demoassets/apollo11/apollo11.png",
        "repository": "apollo11"
      }
    },
    {
      "name": "Apollo 15",
      "icon": "https://snxd.akamaized.net/demoassets/apollo15/apollo15.png",
      "images": ["https://snxd.akamaized.net/demoassets/apollo15/apollo15-1.jpg", "https://snxd.akamaized.net/demoassets/apollo15/apollo15-2.jpg"],
      "description": "Apollo 15 was the ninth manned mission in the United States' Apollo program, the fourth to land on the Moon. It was the first mission on which the Lunar Roving Vehicle was used. <br><br><b>This set includes 319 high-resolution images of the Apollo 15 mission.</b>",
      "size": "1.06GB",
      "data":
      {
        "name": "Apollo 15",
        "image": "https://snxd.akamaized.net/demoassets/apollo15/apollo15.png",
        "repository": "apollo15"
      }
    },
    {
      "name": "Apollo 17",
      "icon": "https://snxd.akamaized.net/demoassets/apollo17/apollo17.png",
      "images": ["https://snxd.akamaized.net/demoassets/apollo17/apollo17-1.jpg", "https://snxd.akamaized.net/demoassets/apollo17/apollo17-2.jpg"],
      "description": "Apollo 17 was the final mission of NASA's Apollo program. The mission broke several records: the longest moon landing, longest total moonwalk, largest lunar sample, and longest time in lunar orbit. <br><br><b>This set includes 16 high-resolution images of the Apollo 17 mission.</b>",
      "size": "118MB",
      "data":
      {
        "name": "Apollo 17",
        "image": "https://snxd.akamaized.net/demoassets/apollo17/apollo17.png",
        "repository": "apollo17"
      }
    }
  ];
  $scope.getCartItems = function() {
    // Get the items to send to the stamping service
    var items = [];
    for (var i = 0; i < $scope.items.length; i += 1) {
      if ($scope.items[i].checked === true) {
        items.push($scope.items[i].data);
      }
    }
    return items;
  };
  $scope.checkItem = function() {
    // Assign disabled css class to download button based on if items selected
    var button = angular.element("#multi-repo-app button");
    if ($scope.getCartItems().length == 0) {
      button.prop('disabled', true);
    } else {
      button.prop('disabled', false);
    }
  };
  $scope.downloadItems = function () {
    var directDlm = createDirectDlm();
    directDlm.setIdWin("ba055d09-dfca-4ef3-91f5-fbbb6a199804");
    directDlm.setIdMac("9db26d11-5064-4421-a0c9-2113e5a79df1");
    directDlm.setFilename("MultiRepoDLM");
    directDlm.addItems($scope.getCartItems());
    directDlm.download();
  };
});
              
            
!
999px

Console