Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/guacamole-client/pull/282#discussion_r185633950
  
    --- Diff: 
guacamole/src/main/webapp/app/manage/directives/managementButtons.js ---
    @@ -0,0 +1,201 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Directive which displays a set of object management buttons (save, 
delete,
    + * clone, etc.) representing the actions available to the current user in
    + * context of the object being edited/created.
    + */
    +angular.module('manage').directive('managementButtons', ['$injector',
    +    function managementButtons($injector) {
    +
    +    // Required services
    +    var guacNotification = $injector.get('guacNotification');
    +
    +    var directive = {
    +
    +        restrict    : 'E',
    +        replace     : true,
    +        templateUrl : 'app/manage/templates/managementButtons.html',
    +
    +        scope : {
    +
    +            /**
    +             * The translation namespace associated with all applicable
    +             * translation strings. This directive requires at least the
    +             * following translation strings within the given namespace:
    +             *
    +             *     - ACTION_CANCEL
    +             *     - ACTION_CLONE
    +             *     - ACTION_DELETE
    +             *     - ACTION_SAVE
    +             *     - DIALOG_HEADER_CONFIRM_DELETE
    +             *     - TEXT_CONFIRM_DELETE
    +             *
    +             * @type String
    +             */
    +            namespace : '=',
    --- End diff --
    
    Does this need to be a model binding (=) or would this be better as a text 
binding (@)?  I don't think the namespace would ever be modified within this 
directive, correct, so it should just be passing it from outside into this 
directive/controller, right?  Is there a reason to do it this way vs. text 
binding?  Just curious.


---

Reply via email to